3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = "foo"; list($foo, $bar, $baz) = $var; var_dump($foo, $bar, $baz); list($foo, $bar, $baz) = "foo"; var_dump($foo, $bar, $baz);
Output for 7.0.0 - 7.1.0
NULL NULL NULL NULL NULL NULL
Output for 4.3.0 - 5.0.5, 5.2.2 - 5.6.28, hhvm-3.10.0 - 3.12.0
string(1) "f" string(1) "o" string(1) "o" NULL NULL NULL
Output for 5.1.0 - 5.2.1
string(1) "f" string(1) "o" string(1) "o" Fatal error: Invalid opcode 98/1/1. in /in/ZZpGC on line 7
Process exited with code 255.