3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterator = new ArrayIterator([new Test(10), new Test(1), new Test(5)]); $iterator->uasort( function ($first, $second) { return $first->getSortOrder() < $second->getSortOrder() ? -1 : 1; } ); $collection = new ArrayCollection(iterator_to_array($iterator)); var_dump($collection->getValues()); die; class Test { private $orderNr; function __construct($orderNr) { $this->orderNr = $orderNr; } public function getSortOrder() { return $this->orderNr; } }

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)
8.3.60.0100.00716.88
8.3.50.0030.01018.05
8.3.40.0180.00018.93
8.3.30.0030.01218.79
8.3.20.0080.00020.21
8.3.10.0030.00621.84
8.3.00.0040.00419.38
8.2.180.0110.00418.29
8.2.170.0070.00722.96
8.2.160.0120.00320.29
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0040.00417.50
8.2.110.0030.00721.05
8.2.100.0040.00717.97
8.2.90.0040.00417.88
8.2.80.0040.00417.97
8.2.70.0000.00817.77
8.2.60.0000.00817.93
8.2.50.0000.00818.10
8.2.40.0030.00820.27
8.2.30.0000.00720.55
8.2.20.0000.00717.63
8.2.10.0050.00218.03
8.2.00.0040.00418.18
8.1.280.0030.01025.92
8.1.270.0080.00023.88
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00322.02
8.1.230.0100.00019.01
8.1.220.0070.00417.74
8.1.210.0080.00018.77
8.1.200.0050.00517.35
8.1.190.0090.00317.35
8.1.180.0000.00818.10
8.1.170.0040.00418.57
8.1.160.0040.00422.03
8.1.150.0040.00418.89
8.1.140.0080.00019.51
8.1.130.0000.00717.71
8.1.120.0070.00017.38
8.1.110.0000.00717.45
8.1.100.0070.00017.48
8.1.90.0000.00817.48
8.1.80.0040.00417.47
8.1.70.0000.00717.39
8.1.60.0000.00817.49
8.1.50.0060.00617.53
8.1.40.0050.00317.38
8.1.30.0030.00517.50
8.1.20.0040.00417.77
8.1.10.0000.00817.51
8.1.00.0040.00417.43
8.0.300.0000.00719.54
8.0.290.0080.00016.75
8.0.280.0000.00718.33
8.0.270.0050.00317.31
8.0.260.0000.00617.28
8.0.250.0030.00617.01
8.0.240.0040.00417.05
8.0.230.0030.00617.06
8.0.220.0070.00017.00
8.0.210.0070.00017.00
8.0.200.0030.00316.93
8.0.190.0050.00317.00
8.0.180.0050.00216.85
8.0.170.0040.00416.96
8.0.160.0030.00316.92
8.0.150.0040.00416.89
8.0.140.0000.00716.89
8.0.130.0000.00613.39
8.0.120.0040.00416.91
8.0.110.0070.00016.93
8.0.100.0000.00717.03
8.0.90.0000.00716.82
8.0.80.0090.01316.98
8.0.70.0040.00417.07
8.0.60.0050.00217.00
8.0.50.0000.00916.82
8.0.30.0090.01117.12
8.0.20.0130.00817.43
8.0.10.0070.00017.05
8.0.00.0070.01116.79
7.4.330.0000.00615.08
7.4.320.0060.00016.42
7.4.300.0040.00416.65
7.4.290.0070.00016.51
7.4.280.0000.00716.61
7.4.270.0000.00716.54
7.4.260.0000.00716.64
7.4.250.0000.00716.57
7.4.240.0040.00416.64
7.4.230.0040.00416.61
7.4.220.0050.01316.67
7.4.210.0050.01116.58
7.4.200.0040.00416.40
7.4.160.0060.00916.61
7.4.150.0140.00417.40
7.4.140.0090.01417.86
7.4.130.0090.00816.62
7.4.120.0140.00516.57
7.4.110.0090.00916.63
7.4.100.0040.01416.45
7.4.90.0060.01216.62
7.4.80.0130.00319.39
7.4.70.0150.00316.59
7.4.60.0150.00316.60
7.4.50.0040.00016.66
7.4.40.0070.01416.62
7.4.30.0080.00916.50
7.4.00.0060.00915.08
7.3.330.0000.00513.42
7.3.320.0000.00513.33
7.3.310.0070.00016.40
7.3.300.0070.00016.41
7.3.290.0000.00716.18
7.3.280.0090.00716.33
7.3.270.0040.01417.40
7.3.260.0080.00816.54
7.3.250.0070.01116.37
7.3.240.0030.01416.46
7.3.230.0150.00416.55
7.3.210.0080.00816.35
7.3.200.0110.01016.48
7.3.190.0130.00616.42
7.3.180.0040.01116.43
7.3.170.0170.00716.31
7.3.160.0090.00616.43
7.3.10.0100.00316.68
7.3.00.0140.00016.43
7.2.330.0130.00716.59
7.2.320.0060.01216.72
7.2.310.0110.01116.58
7.2.300.0070.01016.55
7.2.290.0060.01316.62
7.2.130.0110.00316.85
7.2.120.0100.00716.88
7.2.110.0000.01016.70
7.2.100.0090.00616.95
7.2.90.0100.00316.75
7.2.80.0030.01016.77
7.2.70.0040.01417.06
7.2.60.0030.01316.99
7.2.50.0000.01116.91
7.2.40.0040.01216.97
7.2.30.0040.01417.13
7.2.20.0030.00716.88
7.2.10.0090.00616.56
7.2.00.0060.00917.93
7.1.250.0060.01015.77
7.1.200.0000.00915.58
7.1.100.0050.00517.93
7.1.70.0070.01016.66
7.1.60.0030.01719.48
7.1.50.0060.00916.74
7.1.00.0000.08022.48
7.0.200.0320.01014.76
7.0.60.0130.03720.04
7.0.50.0070.07017.92
7.0.40.0070.04020.24
7.0.30.0330.04020.24
7.0.20.0170.05020.15
7.0.10.0200.07720.12
7.0.00.0030.09320.24
5.6.280.0030.06320.87
5.6.210.0100.07720.67
5.6.200.0030.08318.25
5.6.190.0030.07720.61
5.6.180.0400.07720.63
5.6.170.0200.08020.62
5.6.160.0070.04320.39
5.6.150.0130.07718.27
5.6.140.0030.04318.21
5.6.130.0070.03718.16
5.6.120.0130.07021.02
5.6.110.0030.08321.11
5.6.100.0000.04320.96
5.6.90.0230.08020.96
5.6.80.0100.03320.29
5.5.350.4000.04720.41
5.5.340.0030.07018.02
5.5.330.0100.06320.19
5.5.320.0270.03720.21
5.5.310.0330.07720.24
5.5.300.0070.06317.95
5.5.290.0100.06018.04
5.5.280.0100.03720.66
5.5.270.0030.05720.80
5.5.260.0000.04320.63
5.5.250.0100.07020.59
5.5.240.0200.06720.29

preferences:
56.92 ms | 400 KiB | 5 Q