It looks like you're trying to implement 'Enterprise Sortbuzz' rather than an algorithm ;-)
I think you're enterprise-wrapping this :
$numbers = [];
foreach (range(1, 100000) as $i) {
$numbers[] = rand(1, 100000);
}
$time = -microtime(true);
usort($numbers, function ($a, $b) {
return $a < $b;
});
$time += microtime(true);
printf("Total execution time: %f s\n", $time);
Which on my machine takes about 0.4s - ymmv :-)
To flesh things out a bit more - Java is compiled so will run the code faster almost no matter what you do for something like this. I would suspect Java compilers are also smart enough these days to replace things like your call to $this->less() just with the inline $a < $b too.
In comparison, PHP is dynamic so every time you call a function, create a new object etc it's got to do a bit more work than Java as it doesn't know 'ahead of time' what it's going to be doing.
JS is obscenely optimised for a lot of common tasks (have a look at the numbers on the julia-lang website for instance). You've got the likes of google, microsoft, mozilla, apple etc all spending huge $$ on making it fast.
If you are after raw speed when trying to implement an basic algorithm wrapped up in classes, method calls that re-imagine existing language features etc - then PHP will look bad compared to lots of other languages (especially compiled ones). On the other hand, if you're writing a realistic application then it'll hold it's own.