|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-08-31 18:15 UTC] bjori@php.net
[2007-08-31 18:16 UTC] bjori@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 18 23:00:02 2025 UTC |
Description: ------------ What are the chances of changing the way in which switch case-matching works, from a '=='-equivalent to a '==='-equivalent? Alternatively, how about a huge warning on the manual page for the switch statement for people who might reasonably expect that the attached code would act in a sane fashion? Reproduce code: --------------- switch (null) { case 0: echo "PHP case-matching is brain-damaged.\n"; break; case null: echo "PHP case-matching is sane.\n"; break; } Expected result: ---------------- PHP case-matching is sane. Actual result: -------------- PHP case-matching is brain-damaged.