|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-14 23:38 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 07:00:01 2025 UTC |
Description: ------------ the switch statement doesn't compare the number '0' with strings correct. Reproduce code: --------------- $act = 0; $var = ''; switch($act){ case "search": $var = "search"; break; case 0: case "0": case '0': case false: default: $var = "zero"; } echo $var; Expected result: ---------------- zero Actual result: -------------- search