3v4l.org

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