3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iterator = array_to_iterator([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.0120.00316.38
8.3.50.0090.00922.05
8.3.40.0130.00718.79
8.3.30.0000.01518.70
8.3.20.0040.00420.16
8.3.10.0030.00521.73
8.3.00.0030.00519.38
8.2.180.0150.00018.33
8.2.170.0070.01022.96
8.2.160.0100.00319.13
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0090.00026.16
8.2.120.0070.00317.63
8.2.110.0060.00621.19
8.2.100.0040.00717.91
8.2.90.0060.00317.75
8.2.80.0030.00617.97
8.2.70.0030.00518.04
8.2.60.0080.00017.93
8.2.50.0040.00418.10
8.2.40.0060.00320.61
8.2.30.0000.00720.63
8.2.20.0040.00417.65
8.2.10.0070.00018.07
8.2.00.0040.00417.87
8.1.280.0140.00025.92
8.1.270.0060.00323.83
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.18
8.1.230.0070.00319.16
8.1.220.0090.00017.74
8.1.210.0030.00518.77
8.1.200.0040.00417.22
8.1.190.0030.00617.22
8.1.180.0030.00518.10
8.1.170.0000.00818.52
8.1.160.0040.00421.96
8.1.150.0000.00718.81
8.1.140.0040.00419.44
8.1.130.0030.00317.61
8.1.120.0040.00417.21
8.1.110.0000.00817.26
8.1.100.0050.00217.37
8.1.90.0000.00817.36
8.1.80.0000.00817.32
8.1.70.0030.00317.38
8.1.60.0040.00417.37
8.1.50.0030.00617.43
8.1.40.0040.00417.34
8.1.30.0030.00517.64
8.1.20.0000.00817.57
8.1.10.0090.00017.45
8.1.00.0050.00317.45
8.0.300.0000.00819.63
8.0.290.0000.00716.75
8.0.280.0070.00018.44
8.0.270.0070.00017.23
8.0.260.0030.00317.21
8.0.250.0080.00016.86
8.0.240.0040.00416.95
8.0.230.0090.00016.84
8.0.220.0030.00516.91
8.0.210.0040.00416.75
8.0.200.0000.00816.92
8.0.190.0040.00417.01
8.0.180.0040.00416.95
8.0.170.0040.00416.79
8.0.160.0070.00016.81
8.0.150.0070.00016.80
8.0.140.0040.00416.86
8.0.130.0000.00513.36
8.0.120.0000.00816.75
8.0.110.0000.00716.83
8.0.100.0040.00416.70
8.0.90.0000.00716.85
8.0.80.0030.01316.93
8.0.70.0040.00416.79
8.0.60.0040.00416.90
8.0.50.0000.00916.89
8.0.30.0130.00517.13
8.0.20.0110.00717.40
8.0.10.0070.00017.00
8.0.00.0120.00616.52
7.4.330.0050.00015.08
7.4.320.0030.00316.49
7.4.300.0000.00616.36
7.4.290.0030.00316.37
7.4.280.0000.00716.55
7.4.270.0050.00216.46
7.4.260.0080.00016.36
7.4.250.0000.00716.43
7.4.240.0000.00716.51
7.4.230.0030.00316.57
7.4.220.0110.00616.39
7.4.210.0070.00816.56
7.4.200.0000.00716.57
7.4.160.0080.00816.36
7.4.150.0100.00717.40
7.4.140.0110.00817.86
7.4.130.0100.00616.51
7.4.120.0100.00716.52
7.4.110.0060.01316.25
7.4.100.0110.00716.66
7.4.90.0060.01016.58
7.4.80.0080.01019.39
7.4.70.0060.01216.35
7.4.60.0070.01016.41
7.4.50.0030.00316.60
7.4.40.0150.00316.53
7.4.30.0130.00316.59
7.4.00.0060.01115.10
7.3.330.0000.00513.31
7.3.320.0050.00013.18
7.3.310.0000.00716.22
7.3.300.0030.00316.33
7.3.290.0040.00416.22
7.3.280.0060.01016.23
7.3.270.0080.00917.40
7.3.260.0170.00016.18
7.3.250.0110.00716.40
7.3.240.0130.00516.47
7.3.230.0100.01016.63
7.3.210.0090.00816.35
7.3.200.0040.01216.38
7.3.190.0060.01116.39
7.3.180.0120.00416.33
7.3.170.0100.01116.29
7.3.160.0100.00916.30
7.3.120.0030.01314.86
7.3.110.0100.01014.64
7.3.100.0040.00814.98
7.3.90.0040.00814.57
7.3.80.0030.01015.12
7.3.70.0100.00314.87
7.3.60.0080.00814.60
7.3.50.0060.00614.63
7.3.40.0050.00514.91
7.3.30.0030.01014.79
7.3.20.0090.00616.70
7.3.10.0070.00716.57
7.3.00.0080.00416.52
7.2.330.0150.00316.34
7.2.320.0120.00616.35
7.2.310.0060.01216.32
7.2.300.0090.00816.55
7.2.290.0150.00316.26
7.2.250.0030.01614.71
7.2.240.0030.01715.05
7.2.230.0120.00015.01
7.2.220.0060.01015.01
7.2.210.0070.01115.00
7.2.200.0000.01214.85
7.2.190.0070.00714.86
7.2.180.0000.01714.96
7.2.170.0000.01814.54
7.2.60.0070.00716.78
7.2.00.0000.01119.26
7.1.330.0000.01715.72
7.1.320.0070.00715.60
7.1.310.0100.00615.54
7.1.300.0070.00715.55
7.1.290.0030.00815.47
7.1.280.0070.00715.44
7.1.270.0040.00815.69
7.1.260.0090.00315.56
7.1.200.0060.00615.75
7.1.100.0000.01518.03
7.1.70.0040.00716.70
7.1.60.0130.01019.48
7.1.50.0030.01716.86
7.1.00.0070.07322.33
7.0.200.0360.00714.59
7.0.60.0370.07320.09
7.0.50.0100.04317.93
7.0.40.0030.04320.09
7.0.30.0230.04020.08
7.0.20.0400.07020.23
7.0.10.0030.08720.27
7.0.00.0070.08320.22
5.6.280.0000.07721.13
5.6.210.0130.05320.51
5.6.200.0070.07718.19
5.6.190.0070.06720.46
5.6.180.0370.07320.61
5.6.170.0270.06720.39
5.6.160.0070.08720.61
5.6.150.0130.05318.23
5.6.140.0100.04718.11
5.6.130.0200.07718.21
5.6.120.0030.04321.11
5.6.110.0130.08021.02
5.6.100.0170.07020.99
5.6.90.0030.08320.98
5.6.80.0100.03320.39
5.5.350.0170.04020.35
5.5.340.0100.07017.96
5.5.330.0100.04020.43
5.5.320.0200.04320.31
5.5.310.0270.07320.41
5.5.300.0000.04318.08
5.5.290.0070.08317.97
5.5.280.0170.05320.78
5.5.270.0100.03720.77
5.5.260.0170.06020.77
5.5.250.0070.08720.70
5.5.240.0170.07020.27

preferences:
50.29 ms | 401 KiB | 5 Q