3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = array(); $test['eval_none'] = ''; $test['eval_zero'] = 0; $test['eval_null'] = null; $test['eval_false'] = false; $test['eval_true'] = true; if (isset($test['eval_none'])) var_dump('None is set.'); if (!empty($test['eval_none'])) echo 'None is not empty.\n'; if (isset($test['eval_zero'])) echo 'Zero is set.<br>'; if (!empty($test['eval_zero'])) echo 'Zero is not empty.<br>'; if (isset($test['eval_null'])) echo 'NULL is set.<br>'; if (!empty($test['eval_null'])) echo 'NULL is not empty.<br>'; if (isset($test['eval_false'])) echo 'False is set.<br>'; if (!empty($test['eval_false'])) echo 'False is not empty.<br>'; if (isset($test['eval_true'])) echo 'True is set.<br>'; if (!empty($test['eval_true'])) echo 'True is not empty.<br>';
based on oCPWJ
Output for 4.3.0 - 7.2.0
string(12) "None is set." Zero is set.<br>False is set.<br>True is set.<br>True is not empty.<br>