3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = ['var1' => 'foo', 'var2' => 'bar']; list($var1, $var2) = $a; var_dump($var1, $var2);
Output for 7.0.0 - 7.3.0
Notice: Undefined offset: 0 in /in/B2pvV on line 4 Notice: Undefined offset: 1 in /in/B2pvV on line 4 NULL NULL
Output for 5.4.10 - 5.6.38
Notice: Undefined offset: 1 in /in/B2pvV on line 4 Notice: Undefined offset: 0 in /in/B2pvV on line 4 NULL NULL
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/B2pvV on line 2
Process exited with code 255.