3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php foreach (array('"" == 0', '0 == ""', '"" == "0"', '"0" == ""', '"" == null', 'null == ""') as $e) { echo $e, ' ==> ', var_dump(eval(e)); }
Output for 7.2.0
"" == 0 ==> Warning: Use of undefined constant e - assumed 'e' (this will throw an Error in a future version of PHP) in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1
Process exited with code 255.
Output for 7.0.0 - 7.1.10
"" == 0 ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1
Process exited with code 255.
Output for 5.4.12 - 5.6.28
"" == 0 ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) 0 == "" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) "" == "0" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) "0" == "" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) "" == null ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) null == "" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected end of file in /in/kU6Yr(3) : eval()'d code on line 1 bool(false)
Output for 5.3.22 - 5.3.29
"" == 0 ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected $end in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) 0 == "" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected $end in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) "" == "0" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected $end in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) "0" == "" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected $end in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) "" == null ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected $end in /in/kU6Yr(3) : eval()'d code on line 1 bool(false) null == "" ==> Notice: Use of undefined constant e - assumed 'e' in /in/kU6Yr on line 3 Parse error: syntax error, unexpected $end in /in/kU6Yr(3) : eval()'d code on line 1 bool(false)
Process exited with code 255.