3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // A reference can be taken to a key that doesn’t exist within an undefined variable (which becomes an array). Using a non-existent array // normally issues a notice, but this does not. $ref = &$array[$key]; var_dump($array,$ref);
Output for 7.1.0
Notice: Undefined variable: key in /in/9gn1c on line 4 Notice: Undefined variable: key in /in/9gn1c on line 4 array(1) { [""]=> &NULL } NULL
Output for 5.0.4 - 7.0.14
Notice: Undefined variable: key in /in/9gn1c on line 4 array(1) { [""]=> &NULL } NULL
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: key in /in/9gn1c on line 4 array(1) { [""]=> &NULL } NULL