3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ function mySort($a,$b){ return $a-$b; } function test(){ $arr = array(1,2,3,4,5,6,7); usort($arr,array('Test','mySort'); } } $t = new Test(); $t->test();
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.25
Parse error: syntax error, unexpected ';' in /in/NGomS on line 9
Process exited with code 255.

preferences:
187.12 ms | 1395 KiB | 62 Q