3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $my_array = array( array(0=>"a", 1=>"b", 4=>"c"), array(3=>"z"), array(0=>"p", 2=>"k"), ); usort($my_array, function cmp($a, $b) { if (count($a) == count($b)) { return 0; } return (count($a) < count($b)) ? -1 : 1; }); print_r($my_array);
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'cmp' (T_STRING), expecting '(' in /in/qYIc5 on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting '(' in /in/qYIc5 on line 9
Process exited with code 255.