3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function sortFunction( $a, $b ) { return strtotime($a["date"]) - strtotime($b["date"]); } $data=[{"date":"2013-09-01 00:00:02","content":"1"}, {"date":"2013-09-01 00:00:09","content":"5"}, {"date":"2013-09-01 00:00:01","content":"3"}]; usort($data, "sortFunction"); var_dump($data);
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected '{', expecting ']' in /in/aYMJA on line 7
Process exited with code 255.
Output for 5.2.15 - 5.3.27
Parse error: syntax error, unexpected '[' in /in/aYMJA on line 7
Process exited with code 255.