3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = ""; var_dump(empty($var), (!$var)); $var = false; var_dump(empty($var), (!$var)); $var = 0; var_dump(empty($var), (!$var)); var = "something"; var_dump(empty($var), (!$var));
Output for 5.4.20
Parse error: syntax error, unexpected 'var' (T_VAR) in /in/4D2CT on line 15
Process exited with code 255.
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected 'var' (T_VAR) in /in/1e89R on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VAR in /in/1e89R on line 15
Process exited with code 255.