ID:          37656
 Updated by:  [EMAIL PROTECTED]
 Reported By: stevepburke at hotmail dot com
-Status:      Open
+Status:      Closed
 Bug Type:    Documentation problem
 PHP Version: Irrelevant
 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation
better.




Previous Comments:
------------------------------------------------------------------------

[2006-05-31 16:50:15] stevepburke at hotmail dot com

Description:
------------
In the documentation for the 'switch' statement, there is an example by
scott at firefallpro dot com dated 22-Dec-2005 03:01.

In his second example, it doesn't seem to work properly unless the
switch statement is "switch(true)" and not "switch($x)"

Reproduce code:
---------------
Example:
<?php
$x = 0;

switch($x) {
 case $x === "a":
   echo "a";
   break;
 case $x === "b":
   echo "b";
   break;
 default
   echo "default";
}
?>




Expected result:
----------------
default

Actual result:
--------------
a


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37656&edit=1

Reply via email to