3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php list($a,$b) = "aa"; var_dump($a,$b); list($a,$b) = str_split("aa"); var_dump($a,$b); $a = array(); $a[]="a"; $a[] ="a"; list($x,$y) = $a; var_dump($x,$y);
based on 9XlKX
Output for 5.0.0 - 5.0.5, 5.2.2 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
NULL NULL string(1) "a" string(1) "a" string(1) "a" string(1) "a"
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.0 - 5.2.1
Fatal error: Invalid opcode 98/1/1. in /in/O27M1 on line 2
Process exited with code 255.
Output for 4.4.5 - 4.4.9
NULL NULL Fatal error: Call to undefined function: str_split() in /in/O27M1 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
NULL NULL Fatal error: Call to undefined function: str_split() in /in/O27M1 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
NULL NULL Fatal error: Call to undefined function: str_split() in /in/O27M1 on line 5