- var_export: documentation ( source)
<?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 );
?>