|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-07-01 23:13 UTC] wiesemann@php.net
-Summary: Logic problem in example
+Summary: [DE] Logic problem in example
-Status: Open
+Status: Analyzed
-Package: Documentation problem
+Package: Translation problem
-Assigned To:
+Assigned To: wiesemann
[2010-07-01 23:13 UTC] wiesemann@php.net
[2010-07-02 21:40 UTC] wiesemann@php.net
[2010-07-02 21:40 UTC] wiesemann@php.net
-Status: Analyzed
+Status: Closed
[2010-07-02 21:40 UTC] wiesemann@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 05:00:01 2025 UTC |
Description: ------------ The is_bool example is not correct. Here ist the original example: <?php $a = false; $b = 0; // Da $a ein Boolean ist, wird true zurückgegeben if (is_bool($a)) { echo "Ja, das ist ein Boolean"; } // Da $b kein Boolean ist, wird false zurückgegeben if (is_bool($b)) { echo "Nein, dies ist kein Boolean"; } ?> The correct example should be like the following "Test script" or similar. Test script: --------------- <?php $a = false; $b = 0; // Da $a ein Boolean ist, wird true zurückgegeben if (is_bool($a)) { echo "Ja, \$a ist ein Boolean. "; } // Da $b kein Boolean ist, wird false zurückgegeben if (is_bool($b)) { echo "Ja, \$b ist ein Boolean. "; } else { echo "Nein, \$b ist kein Boolean. "; } ?> Expected result: ---------------- Ja, $a ist ein Boolean. Nein, $b ist kein Boolean. Actual result: -------------- Ja, das ist ein Boolean