3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $nullvar = null; $nullstr = ''; $notnull = 'foo'; $unset = 'something'; unset($unset); function quiet_dump($v) { ob_start(); echo '<pre>'; var_dump($v); echo '</pre>'; return ob_get_clean(); } $results = array( '<h1>Results</h1>' , '<br/>$nullvar = ' , quiet_dump(isset($nullvar), true) , '<br/> $nullstr = ' , quiet_dump(isset($nullstr), true) , '<br/>$notnull = ' , quiet_dump(isset($notnull), true) , '<br/>$unset = ' , quiet_dump(isset($unset), true) ); echo implode(' ',$results);
Output for 4.3.0 - 7.1.0
<h1>Results</h1> <br/>$nullvar = <pre>bool(false) </pre> <br/> $nullstr = <pre>bool(true) </pre> <br/>$notnull = <pre>bool(true) </pre> <br/>$unset = <pre>bool(false) </pre>