|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-23 16:46 UTC] sklogika2 at gmail dot com
[2016-04-23 16:58 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2016-04-23 16:58 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 11:00:02 2025 UTC |
Description: ------------ In the code below I get result of "not zero" when I should get "zero" Such case comparisons do not work properly only with 0, with other numbers it is ok Test script: --------------- $userId = 0; switch ($userId) { case $userId !== 0: echo "not zero"; break; case 'userIdKOZqAfk': echo "zero"; break; } Expected result: ---------------- zero Actual result: -------------- not zero