3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function contextCheck($context) { return isset($_GET[$context] ? $_GET[$context] : false; } $_GET['foo'] = '12'; $_GET['bar'] = '0'; echo 'foo: ', var_export(contextCheck( 'foo' ), true ), "\n", 'bar: ', var_export( contextCheck( 'bar' ), true ); ?>
Output for 5.5.0 - 5.5.8
Parse error: syntax error, unexpected ';' in /in/anSn9 on line 4
Process exited with code 255.
Output for 5.3.0 - 5.4.24
Parse error: syntax error, unexpected '?', expecting ',' or ')' in /in/anSn9 on line 4
Process exited with code 255.