3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $myArr = []; // Is safe if (!empty($myArr['foo'])) { var_dump($myArr['foo']); } // Is not safe $myVal = $myArr['foo'];
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.21.3, 7.0.0 - 7.3.1
Notice: Undefined index: foo in /in/87i5g on line 11
Output for hhvm-3.22.0
Notice: Undefined index: foo in /in/87i5g on line -1