3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array($a => array($a = 2)); var_dump($array, $a);
Output for 5.1.0 - 7.2.6
array(1) { [2]=> array(1) { [0]=> int(2) } } int(2)
Output for 5.0.4 - 5.0.5
Notice: Undefined variable: a in /in/vBnF6 on line 3 array(1) { [""]=> array(1) { [0]=> int(2) } } int(2)
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: a in /in/vBnF6 on line 3 array(1) { [""]=> array(1) { [0]=> int(2) } } int(2)