3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = 0; // Evaluates to true because $var is empty if (empty($var)) { echo "$var is either 0, empty, or not set at all"; } // Evaluates as true because $var is set if (isset($var)) { echo "$var is set even though it is empty"; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0 is either 0, empty, or not set at all0 is set even though it is empty