3v4l.org

run code in 300+ PHP versions simultaneously
<?php class RouteCollection implements \IteratorAggregate, \Countable { /** * @var Route[] */ public $routes = array(); /** * Gets the current RouteCollection as an Iterator that includes all routes. * * It implements \IteratorAggregate. * * @see all() * * @return \ArrayIterator An \ArrayIterator object for iterating over routes */ public function getIterator() { return new \ArrayIterator($this->routes); } } $c = new RouteCollection(); $o = new stdClass; $o->prio = 1; $c->routes[] = $o; $o = new stdClass; $o->prio = 3; $c->routes[] = $o; $c->getIterator()->uasort(function($a, $b) { if ($a->prio == $b->prio ) { return 0; } return $a->prio > $b->prio ? 1 : -1; } ); var_dump($c->routes);

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.0080.00616.88
8.3.50.0130.00522.82
8.3.40.0070.00718.67
8.3.30.0120.00918.67
8.3.20.0080.00020.38
8.3.10.0040.00423.71
8.3.00.0040.00419.13
8.2.180.0030.01718.42
8.2.170.0140.00322.96
8.2.160.0140.00020.44
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0050.00226.16
8.2.120.0070.00020.86
8.2.110.0060.00320.49
8.2.100.0080.00317.84
8.2.90.0040.00419.09
8.2.80.0030.00617.97
8.2.70.0000.00917.63
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0040.00417.97
8.2.30.0040.00418.02
8.2.20.0080.00017.60
8.2.10.0050.00217.97
8.2.00.0050.00317.73
8.1.280.0120.00325.92
8.1.270.0090.00023.79
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00023.95
8.1.230.0040.00722.08
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0040.00417.23
8.1.180.0080.00018.10
8.1.170.0040.00418.64
8.1.160.0080.00022.02
8.1.150.0000.00718.76
8.1.140.0050.00217.32
8.1.130.0000.00717.77
8.1.120.0000.00817.47
8.1.110.0060.00317.32
8.1.100.0020.00517.36
8.1.90.0000.00717.40
8.1.80.0030.00317.40
8.1.70.0050.00217.39
8.1.60.0030.00617.54
8.1.50.0040.00417.42
8.1.40.0030.00617.37
8.1.30.0030.00517.61
8.1.20.0070.00017.59
8.1.10.0000.00717.29
8.1.00.0070.00017.34
8.0.300.0000.00818.77
8.0.290.0080.00016.75
8.0.280.0040.00418.31
8.0.270.0080.00017.20
8.0.260.0030.00317.20
8.0.250.0030.00316.98
8.0.240.0080.00016.86
8.0.230.0000.00716.93
8.0.220.0030.00316.89
8.0.210.0000.00716.95
8.0.200.0070.00016.95
8.0.190.0030.00616.94
8.0.180.0040.00416.89
8.0.170.0040.00416.93
8.0.160.0000.00816.92
8.0.150.0070.00016.85
8.0.140.0040.00416.84
8.0.130.0000.00613.37
8.0.120.0040.00416.84
8.0.110.0070.00016.92
8.0.100.0040.00416.91
8.0.90.0080.00016.73
8.0.80.0130.00316.94
8.0.70.0040.00416.77
8.0.60.0040.00417.03
8.0.50.0070.00016.72
8.0.30.0100.01016.99
8.0.20.0080.01317.40
8.0.10.0040.00416.97
8.0.00.0070.01016.95
7.4.330.0020.00215.03
7.4.320.0030.00316.47
7.4.300.0000.00816.44
7.4.290.0000.00716.55
7.4.280.0030.00516.55
7.4.270.0070.00016.54
7.4.260.0070.00016.55
7.4.250.0040.00416.40
7.4.240.0020.00616.41
7.4.230.0000.00716.55
7.4.220.0100.01416.44
7.4.210.0070.00716.54
7.4.200.0000.00716.63
7.4.160.0060.01016.46
7.4.150.0060.01217.40
7.4.140.0140.00817.86
7.4.130.0100.00716.48
7.4.120.0090.00816.51
7.4.110.0090.00816.51
7.4.100.0150.00816.48
7.4.90.0160.00316.38
7.4.80.0130.00719.39
7.4.70.0150.01016.47
7.4.60.0080.00816.32
7.4.50.0000.00916.29
7.4.40.0130.00616.23
7.4.30.0100.01016.32
7.4.00.0000.01514.79
7.3.330.0030.00313.07
7.3.320.0030.00313.13
7.3.310.0030.00316.14
7.3.300.0040.00416.17
7.3.290.0060.01316.19
7.3.280.0080.00816.24
7.3.270.0080.01217.40
7.3.260.0070.01016.41
7.3.250.0130.00716.37
7.3.240.0100.00616.39
7.3.230.0060.01016.39
7.3.210.0060.01316.27
7.3.200.0090.00919.39
7.3.190.0090.01216.33
7.3.180.0140.00416.43
7.3.170.0120.00416.27
7.3.160.0070.01216.45
7.3.10.0130.00316.52
7.3.00.0090.00616.51
7.2.330.0070.01016.18
7.2.320.0160.00316.61
7.2.310.0100.00716.61
7.2.300.0070.01016.51
7.2.290.0040.01416.63
7.2.130.0130.00616.75
7.2.120.0130.00016.98
7.2.110.0140.00416.87
7.2.100.0060.00616.82
7.2.90.0070.00716.89
7.2.80.0060.01216.67
7.2.70.0030.00716.83
7.2.60.0010.01216.67
7.2.50.0120.00316.97
7.2.40.0050.00516.54
7.2.30.0030.01416.62
7.2.20.0120.00916.55
7.2.10.0050.00716.73
7.2.00.0070.00918.19
7.1.250.0000.01015.64
7.1.200.0070.00315.43
7.1.100.0040.00717.95
7.1.70.0000.00716.63
7.1.60.0070.01119.40
7.1.50.0070.01316.62
7.1.00.0030.07722.35
7.0.200.0000.00816.65
7.0.140.0070.06722.01
7.0.60.0100.08019.91
7.0.50.0030.08717.88
7.0.40.0130.08020.10
7.0.30.0230.04720.13
7.0.20.0300.05020.20
7.0.10.0100.08320.12
7.0.00.0000.05320.23
5.6.280.0000.07720.79
5.6.210.0070.08720.67
5.6.200.0070.05318.15
5.6.190.0100.05720.57
5.6.180.0300.07720.41
5.6.170.0370.06720.47
5.6.160.0100.04720.71
5.6.150.0000.04318.15
5.6.140.0100.03018.18
5.6.130.0200.05318.14
5.6.120.0030.05021.00
5.6.110.0030.05321.02
5.6.100.0100.06721.00
5.6.90.0170.07020.96
5.6.80.0070.07720.45
5.5.350.0170.03320.44
5.5.340.0130.07317.94
5.5.330.0030.08720.29
5.5.320.0030.04320.42
5.5.310.0300.07020.37
5.5.300.0100.08017.95
5.5.290.0070.08017.94
5.5.280.0070.07020.80
5.5.270.0030.04020.96
5.5.260.0070.07320.65
5.5.250.0030.04320.69
5.5.240.0030.08720.37
5.4.450.0800.06719.48
5.4.440.0170.06319.34
5.4.430.0130.06019.58
5.4.420.0270.05019.60
5.4.410.0170.05719.42
5.4.400.0200.05319.29
5.4.390.0230.05319.26
5.4.380.0130.06018.63
5.4.370.0070.06318.59
5.4.360.0300.05018.46
5.4.350.0170.05318.77
5.4.340.0200.04318.56
5.4.320.0020.04412.51
5.4.310.0030.04112.51
5.4.300.0060.03612.50
5.4.290.0060.03712.50
5.4.280.0040.03612.40
5.4.270.0030.03912.39
5.4.260.0040.03912.40
5.4.250.0080.03512.40
5.4.240.0080.03712.40
5.4.230.0070.03612.39
5.4.220.0100.03312.39
5.4.210.0120.04412.39
5.4.200.0070.04212.39
5.4.190.0070.03712.38
5.4.180.0070.03412.39
5.4.170.0070.03412.39
5.4.160.0060.03512.39
5.4.150.0040.03712.39
5.4.140.0040.04312.08
5.4.130.0080.03312.06
5.4.120.0050.03512.02
5.4.110.0060.03412.02
5.4.100.0080.03212.02
5.4.90.0070.03612.02
5.4.80.0060.03612.01
5.4.70.0020.03712.02
5.4.60.0060.03412.02
5.4.50.0050.03512.02
5.4.40.0050.03512.00
5.4.30.0050.03612.00
5.4.20.0080.03212.00
5.4.10.0070.03412.00
5.4.00.0060.03611.49
5.3.290.0060.04412.80
5.3.280.0070.04012.71
5.3.270.0050.04012.72
5.3.260.0020.04212.72
5.3.250.0080.03412.72
5.3.240.0080.03412.72
5.3.230.0020.04112.71
5.3.220.0030.03912.68
5.3.210.0070.03712.68
5.3.200.0040.03912.68
5.3.190.0070.03712.68
5.3.180.0070.04112.67
5.3.170.0100.03312.67
5.3.160.0120.03312.67
5.3.150.0100.03412.68
5.3.140.0090.03412.66
5.3.130.0130.03212.66
5.3.120.0060.03912.66
5.3.110.0110.03512.66
5.3.100.0060.03912.14
5.3.90.0070.03812.13
5.3.80.0070.03712.11
5.3.70.0100.03712.11
5.3.60.0040.04012.10
5.3.50.0060.03812.04
5.3.40.0080.04712.04
5.3.30.0090.03612.01
5.3.20.0080.03711.79
5.3.10.0100.03511.75
5.3.00.0060.03911.73
5.2.170.0080.0429.23
5.2.160.0030.0379.23
5.2.150.0050.0329.23
5.2.140.0070.0349.22
5.2.130.0100.0359.18
5.2.120.0080.0269.18
5.2.110.0100.0309.19
5.2.100.0070.0359.20
5.2.90.0060.0319.18
5.2.80.0060.0299.18
5.2.70.0070.0349.18
5.2.60.0060.0329.13
5.2.50.0070.0299.10
5.2.40.0040.0299.07
5.2.30.0060.0329.06
5.2.20.0050.0369.05
5.2.10.0060.0328.95
5.2.00.0060.0308.82
5.1.60.0080.0278.09
5.1.50.0070.0378.09
5.1.40.0050.0358.07
5.1.30.0060.0328.42
5.1.20.0060.0358.45
5.1.10.0050.0308.17
5.1.00.0060.0348.17
5.0.50.0030.0266.65
5.0.40.0050.0266.51
5.0.30.0030.0316.32
5.0.20.0010.0216.29
5.0.10.0030.0206.26
5.0.00.0010.0366.25
4.4.90.0020.0164.77
4.4.80.0060.0184.76
4.4.70.0020.0164.75
4.4.60.0010.0174.75
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0040.0204.85
4.4.10.0050.0144.85
4.4.00.0030.0294.76
4.3.110.0040.0204.67
4.3.100.0030.0154.66
4.3.90.0030.0184.63
4.3.80.0040.0264.59
4.3.70.0050.0144.63
4.3.60.0030.0154.63
4.3.50.0030.0174.63
4.3.40.0030.0324.54
4.3.30.0000.0183.30
4.3.20.0020.0183.28
4.3.10.0020.0203.23
4.3.00.0000.01315.97

preferences:
40.32 ms | 401 KiB | 5 Q