3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = ["a" => false, "b" => NULL]; var_dump($var); foreach($var AS $key=>$val){ echo isset($var[$key]) ? "T":"F"; echo PHP_EOL; echo NULL === $val ? "T" : "F"; echo PHP_EOL; echo empty($val) ? "T" : "F"; }
Output for 5.4.0 - 7.1.0
array(2) { ["a"]=> bool(false) ["b"]=> NULL } T F TF T T
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/H83dq on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/H83dq on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/H83dq on line 3
Process exited with code 255.