3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (isset($test) && $test != NULL) { echo '$test set and not null'; } else { echo '$test not set and not null'; } $test = ''; if (isset($test) && $test != NULL) { echo '$test set and not null'; } else { echo '$test not set and not null'; } if (isset($test)) { echo '$test set, even when null'; } $test = "abc"; if (isset($test) && $test != NULL) { echo '$test set and not null'; } else { echo '$test not set and not null'; }
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
$test not set and not null$test not set and not null$test set, even when null$test set and not null