3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php array(28) { [0]=> array(3) { ["name"]=> string(9) "Lise Toit" ["birthday"]=> string(5) "May 2" ["age"]=> int(23) } [1]=> array(3) { ["name"]=> string(12) "Arno Du Toit" ["birthday"]=> string(8) "April 17" ["age"]=> int(22) } [2]=> array(3) { ["name"]=> string(11) "Carla Bruni" ["birthday"]=> string(8) "April 24" ["age"]=> int(21) } [3]=> array(3) { ["name"]=> string(13) "Marto Hanekom" ["birthday"]=> string(8) "April 19" ["age"]=> int(20) } } $sort_dates = function($a, $b) { $a = strtotime($a['birthday']); $b = strtotime($b['birthday']); if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; }; usort($upcoming, $sort_dates);
Output for 5.3.0 - 5.4.14
Parse error: syntax error, unexpected '{' in /in/RlXlA on line 3
Process exited with code 255.