3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function check($value) { if ($value != "") { echo 'is not an empty string'; } else if ($value == '') { echo 'is an empty string'; } else { echo 'something else'; } } foreach(array( '', 0, false, true, null, -1, array(), 1, '0', '1' )) as $value) { var_export($value); echo check($value), "\n\n"; }

Abusive script

This script was stopped while abusing our resources

Output for 5.3.0 - 5.4.28
Parse error: syntax error, unexpected ')' in /in/76ln7 on line 22
Process exited with code 255.