3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function true_or_false($bool) { return $bool ? 'true' : 'false'; } function do_test($expression) { echo "\t$expression : " . true_or_false(eval("return $expression;")) . "\n"; } function test($str) { echo "Testing $str\n"; do_test("$str == 0"); do_test("$str === 0"); } test('""'); test('null'); test('array()');
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Testing "" "" == 0 : true "" === 0 : false Testing null null == 0 : true null === 0 : false Testing array() array() == 0 : false array() === 0 : false
Output for hhvm-3.10.0

Process exited with code 153.