3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $users = array( array('Foo', 'Bar'), array('Baz', 'Qux'); ); // Before foreach ($users as $user) { list($firstName, $lastName) = $user; echo "First name: $firstName, last name: $lastName. "; } // After foreach ($users as list($firstName, $lastName)) { echo "First name: $firstName, last name: $lastName. "; }
Output for 5.3.0 - 5.4.9
Parse error: syntax error, unexpected ';', expecting ')' in /in/TaDqE on line 4
Process exited with code 255.