3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cmp($a, $b) { if($a->date == $b->date) { return 0; } return ($a->date < $b->date) ? -1 : 1; } $images = array; $i1 = new ImageMetadata("2", "3", "3"); $i2 = new ImageMetadata("2", "1", "3"); $i3 = new ImageMetadata("2", "2", "3"); array_push($images, $i1); array_push($images, $i2); array_push($images, $i3); usort($images, "cmp"); echo json_encode($images); ?>

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)
7.0.10.0100.08720.05
7.0.00.0100.08720.29
5.6.160.0030.08720.57
5.6.150.0130.08018.17
5.6.140.0070.08018.18
5.6.130.0070.08718.14
5.6.120.0100.07321.01
5.6.110.0100.06021.00
5.6.100.0170.07321.01
5.6.90.0170.07320.96
5.6.80.0170.06020.49
5.5.300.0100.07318.03
5.5.290.0030.04317.99
5.5.280.0070.07720.77
5.5.270.0070.04720.87
5.5.260.0030.05020.72
5.5.250.0100.03720.58
5.5.240.0100.08020.29

preferences:
142.59 ms | 1394 KiB | 7 Q