3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function contextCheck($context) { return (isset($_GET[$context]) && strlen($_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 4.3.0 - 7.1.0
foo: '12' bar: '0'