|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-02-25 00:56 UTC] crrodriguez at opensuse dot org
[2009-02-25 01:00 UTC] mpb dot mail at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 10:00:01 2025 UTC |
Description: ------------ When switching on 0 (zero), control flow executes the wrong case. Reproduce code: --------------- <?php $x = 0; switch ($x) { case 'foo': print "foo == $x ?\n"; break; case 0: print "0 == $x ?\n"; break; default: print "default: \$x == $x ?\n"; break; } ?> Expected result: ---------------- 0 == 0 ? Actual result: -------------- foo == 0 ?