3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $users = array( array('time' => 1398869665, 'name' => 'Jenny', 'age' => 20 ), array('time' => 1398854528, 'name' => 'Ben', 'age' => 22), array('time' => 1398854536, 'name' => 'Anna', 'age' => 18 ), array('time' => 1398869401, 'name' => 'Bob', 'age' => 25 ), ); $time = array(); foreach($users $key => $user) { $time[$key] = $user['time']; } array_multisort($time, SORT_DESC, $users);var_dump($users);
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$key' (T_VARIABLE) in /in/llGdp on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/llGdp on line 11
Process exited with code 255.