3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test implements Iterator { function key(){ return new Baz(); } function next(){} function valid(){ $this->count++; return $this->count < 4; } function current(){ return "foo"; } function rewind(){} } foreach(new Test as $x => $v) var_dump($x, $v);

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.0060.01216.88
8.3.50.0150.00522.16
8.3.40.0120.00318.92
8.3.30.0070.00719.22
8.3.20.0050.00220.33
8.3.10.0090.00021.89
8.3.00.0070.00419.23
8.2.180.0070.01016.75
8.2.170.0120.00919.09
8.2.160.0120.00622.96
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00319.67
8.2.110.0030.00622.20
8.2.100.0060.00619.18
8.2.90.0060.00319.30
8.2.80.0040.00417.97
8.2.70.0030.00517.61
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0040.00419.14
8.2.20.0040.00417.93
8.2.10.0050.00218.04
8.2.00.0020.00517.92
8.1.280.0140.00725.92
8.1.270.0030.00618.82
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.88
8.1.230.0040.00819.22
8.1.220.0090.00017.76
8.1.210.0080.00018.77
8.1.200.0060.00317.23
8.1.190.0040.00417.35
8.1.180.0000.01118.10
8.1.170.0030.00618.64
8.1.160.0050.00322.02
8.1.150.0050.00218.92
8.1.140.0000.00717.44
8.1.130.0030.00317.76
8.1.120.0000.00717.45
8.1.110.0000.00817.47
8.1.100.0040.00417.51
8.1.90.0000.00817.40
8.1.80.0000.00717.48
8.1.70.0030.00317.43
8.1.60.0090.00017.52
8.1.50.0030.00517.49
8.1.40.0000.00817.38
8.1.30.0000.00817.64
8.1.20.0000.00817.64
8.1.10.0000.00717.45
8.1.00.0030.00517.54
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0000.00817.30
8.0.260.0030.00317.20
8.0.250.0000.00716.93
8.0.240.0040.00417.06
8.0.230.0030.00317.03
8.0.220.0070.00016.89
8.0.210.0070.00016.86
8.0.200.0000.00816.95
8.0.190.0040.00416.98
8.0.180.0000.00716.85
8.0.170.0040.00416.89
8.0.160.0030.00517.04
8.0.150.0070.00016.81
8.0.140.0040.00716.97
8.0.130.0030.00313.37
8.0.120.0040.00416.82
8.0.110.0040.00416.95
8.0.100.0040.00417.00
8.0.90.0020.00517.02
8.0.80.0060.01217.00
8.0.70.0030.00516.85
8.0.60.0000.00716.92
8.0.50.0040.00416.95
8.0.30.0120.01216.90
8.0.20.0120.00917.40
8.0.10.0040.00417.02
8.0.00.0060.01316.86
7.4.330.0030.00315.03
7.4.320.0030.00316.41
7.4.300.0100.00016.57
7.4.290.0040.00416.40
7.4.280.0000.01116.49
7.4.270.0070.00016.65
7.4.260.0070.00016.39
7.4.250.0040.00416.49
7.4.240.0040.00416.59
7.4.230.0070.00016.58
7.4.220.0100.01716.59
7.4.210.0030.01316.54
7.4.200.0000.00716.71
7.4.160.0090.00616.58
7.4.150.0120.00917.40
7.4.140.0110.00817.86
7.4.130.0060.01016.50
7.4.120.0050.01216.46
7.4.110.0120.00616.46
7.4.100.0040.01516.48
7.4.90.0170.00016.41
7.4.80.0060.01319.39
7.4.70.0170.00616.56
7.4.60.0090.00916.64
7.4.50.0000.00416.40
7.4.40.0100.01316.63
7.4.30.0100.00716.60
7.4.00.0080.00815.15
7.3.330.0060.00013.31
7.3.320.0030.00313.34
7.3.310.0000.00716.34
7.3.300.0000.00716.24
7.3.290.0030.00316.19
7.3.280.0050.01016.38
7.3.270.0120.01517.40
7.3.260.0110.00616.58
7.3.250.0100.00816.34
7.3.240.0130.00316.23
7.3.230.0090.00916.46
7.3.210.0060.01016.38
7.3.200.0160.00419.39
7.3.190.0160.00316.26
7.3.180.0060.00916.45
7.3.170.0110.00716.53
7.3.160.0130.01016.38
7.2.330.0060.01316.55
7.2.320.0100.00716.68
7.2.310.0060.00916.85
7.2.300.0160.00316.61
7.2.290.0120.00616.49
7.2.60.0100.00316.70
7.2.00.0060.00619.42
7.1.200.0100.00315.82
7.1.100.0060.00817.84
7.1.70.0040.00417.05
7.1.60.0110.01419.46
7.1.50.0120.00916.90
7.1.00.0030.07722.29
7.0.200.0410.00714.61
7.0.140.0070.05722.09
7.0.60.0070.05720.00
7.0.50.0070.06317.86
7.0.40.0100.08020.18
7.0.30.0170.04320.23
7.0.20.0170.05020.05
7.0.10.0100.08320.24
7.0.00.0100.07320.34
5.6.280.0030.07321.05
5.6.210.0000.08320.71
5.6.200.0100.07018.19
5.6.190.0030.09720.62
5.6.180.0170.08020.39
5.6.170.0270.06320.44
5.6.160.0070.05020.71
5.6.150.0070.07318.14
5.6.140.0030.04318.29
5.6.130.0170.06718.27
5.6.120.0030.08721.02
5.6.110.0070.08320.90
5.6.100.0130.07721.05
5.6.90.0030.06721.13
5.6.80.0100.03320.36
5.5.350.0000.03320.45
5.5.340.0070.04717.98
5.5.330.0130.07320.20
5.5.320.0230.04720.34
5.5.310.0230.05320.27
5.5.300.0070.07317.97
5.5.290.0130.07717.93
5.5.280.0100.07720.77
5.5.270.0030.07320.87
5.5.260.0230.06320.77
5.5.250.0070.07320.69
5.5.240.3900.04320.35
5.4.450.0270.06019.48
5.4.440.1000.06019.48
5.4.430.0800.06019.55
5.4.420.0830.06719.46
5.4.410.0930.06319.32
5.4.400.0900.06019.38
5.4.390.1000.05018.84
5.4.380.1200.04718.61
5.4.370.0930.05718.77
5.4.360.0970.05718.46
5.4.350.0970.05718.49
5.4.340.1070.05318.80
5.4.320.1100.06318.78
5.4.310.1100.05318.74
5.4.300.0970.06018.62
5.4.290.0900.06318.59
5.4.280.1000.06018.79
5.4.270.0970.06018.73
5.4.260.1070.05018.79
5.4.250.1070.05018.75
5.4.240.1070.06318.84
5.4.230.1030.05718.58
5.4.220.0830.07018.50
5.4.210.0700.07718.43
5.4.200.0970.05716.53
5.4.190.1030.04318.84
5.4.180.0870.05018.71
5.4.170.1070.06718.55
5.4.160.0900.06718.73
5.4.150.1170.06318.73
5.4.140.0870.07316.45
5.4.130.0870.06016.20
5.4.120.0630.05316.33
5.4.110.0970.04716.18
5.4.100.1070.04716.41
5.4.90.0630.06716.25
5.4.80.0700.05716.23
5.4.70.0800.04316.15
5.4.60.1070.05316.30
5.4.50.0930.05016.30
5.4.40.0670.05716.26
5.4.30.2670.06316.27
5.4.20.0700.04716.25
5.4.10.1070.05316.16
5.4.00.0970.05015.75
5.3.290.0970.04714.88
5.3.280.1030.06714.59
5.3.270.1170.06314.63
5.3.260.0870.06014.71
5.3.250.0670.06014.66
5.3.240.0900.05314.76
5.3.230.0970.05014.59
5.3.220.1100.06014.79
5.3.210.0900.05714.75
5.3.200.0730.05314.66
5.3.190.0570.06314.59
5.3.180.0930.05714.62
5.3.170.0800.05314.58
5.3.160.0800.05714.67
5.3.150.0570.06314.70
5.3.140.0170.05314.54
5.3.130.0070.07014.74
5.3.120.0230.05014.57
5.3.110.0200.05714.75
5.3.100.0070.07014.14
5.3.90.0170.05014.07
5.3.80.0200.04714.05
5.3.70.0130.05314.20
5.3.60.0200.05014.03
5.3.50.0130.05314.08
5.3.40.0130.05314.16
5.3.30.0270.04314.04
5.3.20.0270.03713.70
5.3.10.0230.04313.77
5.3.00.0100.05713.75
5.2.170.0070.05011.29
5.2.160.0170.03711.27
5.2.150.0070.05311.21
5.2.140.0070.04711.19
5.2.130.0170.03711.11
5.2.120.0100.04011.14
5.2.110.0070.04311.09
5.2.100.0100.04011.21
5.2.90.0130.04011.13
5.2.80.0130.04011.14
5.2.70.0170.03711.20
5.2.60.0070.05011.11
5.2.50.0130.04011.04
5.2.40.0170.03711.04
5.2.30.0200.03711.02
5.2.20.0130.04011.14
5.2.10.0230.03711.07
5.2.00.0070.06010.82
5.1.60.0100.04710.03
5.1.50.0070.04710.11
5.1.40.0130.03010.01
5.1.30.0130.04010.54
5.1.20.0100.05010.39
5.1.10.0170.03310.08
5.1.00.0170.03010.12
5.0.50.0070.0308.58
5.0.40.0100.0378.63
5.0.30.0130.0508.44
5.0.20.0130.0308.30
5.0.10.0070.0378.26
5.0.00.0100.0508.20
4.4.90.0070.0236.02
4.4.80.0030.0235.86
4.4.70.0100.0206.00
4.4.60.0070.0205.86
4.4.50.0070.0276.00
4.4.40.0070.0435.88
4.4.30.0100.0276.01
4.4.20.0070.0306.07
4.4.10.0070.0235.95
4.4.00.0070.0435.91
4.3.110.0100.0235.81
4.3.100.0100.0175.89
4.3.90.0070.0205.80
4.3.80.0000.0405.91
4.3.70.0030.0235.91
4.3.60.0100.0135.81
4.3.50.0100.0275.82
4.3.40.0070.0405.76
4.3.30.0030.0304.55
4.3.20.0030.0274.53
4.3.10.0030.0274.52
4.3.00.0000.03314.52

preferences:
40.83 ms | 401 KiB | 5 Q