3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php list($a,$b) = (array) "aa"; var_dump($a,$b); $a = array(); $a[]="a"; $a[] ="b"; list($a,$b) = $a; var_dump($a,$b);
based on EB7iq
Output for 5.3.0 - 7.1.0
Notice: Undefined offset: 1 in /in/eJLNi on line 2 string(2) "aa" NULL string(1) "a" string(1) "b"
Output for 4.3.0 - 5.2.17
Notice: Undefined offset: 1 in /in/eJLNi on line 2 string(2) "aa" NULL string(1) "a" string(1) "b"