|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-08-25 16:46 UTC] rasmus@php.net
-Status: Open
+Status: Not a bug
[2013-08-25 16:46 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ See below my testing script. I've test with all version of php it's return same result. Test script: --------------- $a = 0; if($a == 'id'){ echo 'Yes' . PHP_EOL; } var_dump($a); var_dump($a == 'id'); var_dump($a == 'ids'); var_dump($a == 'def'); $a = 1; if($a == 'id'){ echo 'Yes' . PHP_EOL; } var_dump($a); var_dump($a == 'id'); var_dump($a == 'ids'); var_dump($a == 'def'); // Result Yes int(0) bool(true) bool(true) bool(true) int(1) bool(false) bool(false) bool(false) Expected result: ---------------- $a = 0; var_dump($a == 'abc'); //should be: bool(false)