3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function ref(&$a) {} function val($a) {} $b = []; $a = $b['a']['b']; $a =& $b['a']['b']; val($b['a']['b']); ref($b['a']['b']); valn($b['a']['b']); refn($b['a']['b']);
based on 4hFQ5
Output for 7.0.0 - 7.2.0
Notice: Undefined index: a in /in/gLJU8 on line 7 Fatal error: Uncaught Error: Call to undefined function valn() in /in/gLJU8:12 Stack trace: #0 {main} thrown in /in/gLJU8 on line 12
Process exited with code 255.
Output for 5.4.11 - 5.6.28
Notice: Undefined index: a in /in/gLJU8 on line 7 Fatal error: Call to undefined function valn() in /in/gLJU8 on line 12
Process exited with code 255.
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/gLJU8 on line 6
Process exited with code 255.