3v4l.org

run code in 300+ PHP versions simultaneously
<?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 '", 1=>”b”, 4=>”c"' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/cfmqu on line 4
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /in/cfmqu on line 4
Process exited with code 255.

preferences:
193.34 ms | 1395 KiB | 63 Q