3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a=array(2=>"14"); echo isset(($a[2]['foo'])) ? 'set':'not set';echo "\n"; echo isset($a[2]['foo']) ? 'set':'not set';echo "\n"; echo empty($a[2]['foo']) ? 'empty':'not empty';echo "\n"; echo $a[2]['foo'] ? 'truthy':'fruity';echo "\n";
based on h7ZTI
Output for 7.0.0 - 7.2.0
not set not set empty Warning: Illegal string offset 'foo' in /in/MH7J9 on line 6 truthy
Output for 5.5.24 - 5.6.28
Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /in/MH7J9 on line 3
Process exited with code 255.
Output for 5.3.20 - 5.4.45
Parse error: syntax error, unexpected '(' in /in/MH7J9 on line 3
Process exited with code 255.