3v4l.org

run code in 300+ PHP versions simultaneously
<?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 5.3.0 - 5.3.28, 5.4.0 - 5.4.28
Parse error: syntax error, unexpected ')', expecting ',' or ';' in /in/r8E6u on line 19
Process exited with code 255.

preferences:
187.28 ms | 1395 KiB | 65 Q