3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( array('date'=>'2014-12-01', 'price'=>'123.00'), array('date'=>'2013-12-01', 'price'=>'123.00'), array('date'=>'2014-02-01', 'price'=>'123.00'), array('date'=>'2014-03-01', 'price'=>'123.00') ) function sortByDate($a, $b) { return $a['date'] - $b['date']; } usort($array, 'sortByDate'); var_dump($array);
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'function' (T_FUNCTION) in /in/RPsvk on line 8
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_FUNCTION in /in/RPsvk on line 8
Process exited with code 255.