3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $sname; public $fname; public $age; public function __construct($a,$b,$c) { $this->sname = $a; $this->fname = $b; $this->age = $c; return $this; } } $horrible_array_of_stuff = array( new Person("Owen", "Dyckhoff", 27), new Person("Joe", "Bloggs", 36 ) ); print_r($horrible_array_of_stuff); echo "Sorting Array of Objects\n" usort( $horrible_array_of_stuff, function( $left, $right ) { return [$left->sname, $left->fname, $left->age] <=> [$right->sname, $right->fname, $right->age]; } ); print_r($horrible_array_of_stuff);

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.6.160.0030.05720.46
5.6.150.0100.06318.15
5.6.140.0100.06718.11
5.6.130.0030.04018.23
5.6.120.0170.04021.14
5.6.110.0000.04721.14
5.6.100.0030.09021.01
5.6.90.0130.06721.08
5.6.80.0130.08320.26
5.5.300.0030.06717.97
5.5.290.0030.09317.99
5.5.280.0000.04320.88
5.5.270.0030.08320.73
5.5.260.0170.05320.89
5.5.250.0130.05720.59
5.5.240.0370.06020.04

preferences:
125.33 ms | 1398 KiB | 7 Q