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'])) var_dump('None is not empty.'); if (isset($test['eval_zero'])) var_dump('Zero is set.'); if (!empty($test['eval_zero'])) var_dump('Zero is not empty.'); if (isset($test['eval_null'])) var_dump('NULL is set.'); if (!empty($test['eval_null'])) var_dump('NULL is not empty.'); if (isset($test['eval_false'])) var_dump('False is set.'); if (!empty($test['eval_false'])) var_dump('False is not empty.'); if (isset($test['eval_true'])) var_dump('True is set.'); if (!empty($test['eval_true'])) var_dump('True is not empty.');
based on ZbN1P
Output for 4.3.0 - 7.2.0
string(12) "None is set." string(12) "Zero is set." string(13) "False is set." string(12) "True is set." string(18) "True is not empty."