3v4l.org

run code in 200+ 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.30, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.1.10
$var is either 0, empty, or not set at all$var is set even though it is empty