ID: 20780 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows 2000 PHP Version: 4.2.3 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. See http://ch.php.net/manual/en/language.types.string.php#language.types.string.conversion Previous Comments: ------------------------------------------------------------------------ [2002-12-02 23:54:45] [EMAIL PROTECTED] <?php $a = 'center'; switch ($a) { case 'left': case 0: echo 'left';break; case 'right': case 2: echo 'right';break; default:echo 'center'; } ?> The script should generate 'center',yet generate 'left';what's more,any string assigned to variable $a will generate the same error. The reason is the PHP scripting engine cannot distinguish a string with integer 0. I wonder if the switch statement can only be applied on integers. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20780&edit=1