3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $data = [ ['time_diff' => 178], ['time_diff' => 41], ['time_diff' => 83] ]; usort($data, function ($a, $b) { $a['date_diff'] < $b['date_diff']; }); print_r($data);
Output for 7.0.0 - 7.2.0
Notice: Undefined index: date_diff in /in/ceN4O on line 10 Notice: Undefined index: date_diff in /in/ceN4O on line 10 Notice: Undefined index: date_diff in /in/ceN4O on line 10 Notice: Undefined index: date_diff in /in/ceN4O on line 10 Array ( [0] => Array ( [time_diff] => 178 ) [1] => Array ( [time_diff] => 41 ) [2] => Array ( [time_diff] => 83 ) )
Output for 5.4.10 - 5.6.28
Notice: Undefined index: date_diff in /in/ceN4O on line 10 Notice: Undefined index: date_diff in /in/ceN4O on line 10 Notice: Undefined index: date_diff in /in/ceN4O on line 10 Notice: Undefined index: date_diff in /in/ceN4O on line 10 Array ( [0] => Array ( [time_diff] => 83 ) [1] => Array ( [time_diff] => 41 ) [2] => Array ( [time_diff] => 178 ) )
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ceN4O on line 3
Process exited with code 255.