3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(1, 2); $it = new ArrayIterator($array); while ($it->valid()) { $it->next(); echo $it->offsetGet(0); } $it->append(3); echo $it->valid() ? $it->current() : "not valid";

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.0170.00318.43
8.3.50.0070.01021.09
8.3.40.0140.00318.71
8.3.30.0070.00720.27
8.3.20.0040.00420.16
8.3.10.0080.00022.09
8.3.00.0070.00022.37
8.2.180.0040.01518.41
8.2.170.0070.00722.96
8.2.160.0060.00922.20
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0030.00626.16
8.2.120.0080.00019.76
8.2.110.0040.00720.91
8.2.100.0040.00817.78
8.2.90.0040.00418.34
8.2.80.0080.00017.97
8.2.70.0060.00317.50
8.2.60.0000.00817.50
8.2.50.0040.00417.93
8.2.40.0000.00819.38
8.2.30.0000.00717.94
8.2.20.0070.00017.61
8.2.10.0000.00817.57
8.2.00.0040.00417.66
8.1.280.0030.01325.92
8.1.270.0040.01220.41
8.1.260.0040.00426.35
8.1.250.0100.00328.09
8.1.240.0000.00922.59
8.1.230.0030.01020.97
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0100.00017.41
8.1.190.0080.00317.10
8.1.180.0030.00618.10
8.1.170.0000.00817.62
8.1.160.0050.00318.73
8.1.150.0000.00718.56
8.1.140.0050.00317.37
8.1.130.0030.00317.86
8.1.120.0040.00417.30
8.1.110.0050.00217.30
8.1.100.0040.00417.29
8.1.90.0000.00717.37
8.1.80.0000.00717.40
8.1.70.0030.00317.32
8.1.60.0030.00617.40
8.1.50.0020.00517.41
8.1.40.0040.00417.46
8.1.30.0000.00817.40
8.1.20.0030.00617.45
8.1.10.0070.00017.57
8.1.00.0050.00217.38
8.0.300.0020.00520.21
8.0.290.0000.00716.75
8.0.280.0030.00318.36
8.0.270.0030.00317.25
8.0.260.0000.00716.80
8.0.250.0030.00316.94
8.0.240.0030.00516.81
8.0.230.0080.00016.85
8.0.220.0030.00316.87
8.0.210.0030.00316.89
8.0.200.0060.00016.79
8.0.190.0000.00816.77
8.0.180.0040.00416.84
8.0.170.0030.00616.80
8.0.160.0030.00316.71
8.0.150.0000.00716.84
8.0.140.0050.00316.78
8.0.130.0030.00313.22
8.0.120.0000.00816.72
8.0.110.0070.00016.84
8.0.100.0040.00416.79
8.0.90.0000.00816.72
8.0.80.0100.01316.82
8.0.70.0040.00416.88
8.0.60.0000.00716.79
8.0.50.0070.00016.75
8.0.30.0050.01316.98
8.0.20.0120.01017.40
8.0.10.0040.00416.82
8.0.00.0120.00716.67
7.4.330.0020.00215.00
7.4.320.0060.00016.47
7.4.300.0000.00716.42
7.4.290.0000.00716.44
7.4.280.0030.00316.53
7.4.270.0040.00416.53
7.4.260.0030.00516.43
7.4.250.0040.00416.41
7.4.240.0050.00216.43
7.4.230.0000.00716.55
7.4.220.0030.01416.41
7.4.210.0090.00816.49
7.4.200.0050.00216.18
7.4.190.0050.00316.68
7.4.160.0120.00416.34
7.4.150.0110.01017.40
7.4.140.0070.01217.86
7.4.130.0100.00916.26
7.4.120.0040.01316.60
7.4.110.0030.01316.58
7.4.100.0120.00616.27
7.4.90.0130.00316.26
7.4.80.0080.01119.39
7.4.70.0070.00916.43
7.4.60.0100.01016.53
7.4.50.0040.00416.42
7.4.40.0060.01222.77
7.4.30.0090.00616.27
7.4.00.0080.00814.81
7.3.330.0050.00012.87
7.3.320.0000.00612.87
7.3.310.0000.00715.97
7.3.300.0000.00715.99
7.3.290.0040.01216.23
7.3.280.0050.01216.14
7.3.270.0000.01717.40
7.3.260.0080.01416.08
7.3.250.0140.00516.32
7.3.240.0030.01516.12
7.3.230.0100.00716.47
7.3.210.0110.00616.35
7.3.200.0100.00719.39
7.3.190.0060.01216.30
7.3.180.0100.00616.50
7.3.170.0100.01016.40
7.3.160.0060.00916.30
7.3.120.0000.01314.61
7.3.10.0030.00816.27
7.3.00.0000.01016.41
7.2.330.0100.01016.43
7.2.320.0130.00916.58
7.2.310.0070.01416.38
7.2.300.0140.00316.24
7.2.290.0140.00316.58
7.2.130.0030.01216.93
7.2.120.0040.00816.86
7.2.110.0030.00916.78
7.2.100.0060.00916.90
7.2.90.0100.00616.63
7.2.80.0120.00016.91
7.2.70.0030.01316.62
7.2.60.0020.01016.91
7.2.50.0000.00916.89
7.2.40.0090.00316.75
7.2.30.0000.00916.96
7.2.20.0070.00316.73
7.2.10.0140.00016.94
7.2.00.0070.00716.80
7.1.250.0030.00615.73
7.1.200.0030.00915.36
7.1.70.0000.00817.00
7.1.60.0070.00417.19
7.1.50.0100.01016.89
7.1.00.0100.05022.48
7.0.200.0090.00616.44
7.0.140.0100.06322.09
7.0.60.0070.08319.96
7.0.50.0070.08017.85
7.0.40.0070.08720.05
7.0.30.0400.06720.04
7.0.20.0300.06320.17
7.0.10.0330.05320.01
7.0.00.0130.08020.01
5.6.280.0000.07720.93
5.6.210.0100.03320.45
5.6.200.0100.03718.21
5.6.190.0030.05320.57
5.6.180.0030.07720.48
5.6.170.0230.04720.48
5.6.160.0070.08320.49
5.6.150.0070.05318.18
5.6.140.0070.07018.15
5.6.130.0130.06718.18
5.6.120.0030.04720.98
5.6.110.0100.07721.04
5.6.100.0130.07321.02
5.6.90.0100.07320.96
5.6.80.0030.06020.37
5.6.70.0170.07720.38
5.5.350.0030.04020.41
5.5.340.0100.05718.02
5.5.330.0170.08020.57
5.5.320.0230.03320.30
5.5.310.0370.07320.28
5.5.300.0130.07317.98
5.5.290.0000.05017.92
5.5.280.0100.08720.80
5.5.270.0100.04720.96
5.5.260.0100.08020.75
5.5.250.0030.04020.58
5.5.240.0100.05720.28
5.4.450.0670.06719.15
5.4.440.0700.06719.47
5.4.430.0200.06319.48
5.4.420.0130.04719.32
5.4.410.0770.05319.11
5.4.400.1000.06018.65
5.4.390.1300.06718.74
5.4.380.0400.04018.61
5.4.370.0070.06018.70
5.4.360.0100.05318.68
5.4.350.0090.03811.98
5.4.340.0040.04711.97
5.4.320.0060.04312.46
5.4.310.0060.03812.45
5.4.300.0090.03312.45
5.4.290.0030.04112.45
5.4.280.0050.03712.35
5.4.270.0080.03812.35
5.4.260.0110.04312.35
5.4.250.0070.06318.89
5.4.240.0000.06018.70
5.4.230.0000.06018.88
5.4.220.0100.06318.94
5.4.210.0100.05018.74
5.4.200.0100.07018.88
5.4.190.0100.04718.76
5.4.180.0100.05018.98
5.4.170.0130.04318.72
5.4.160.0030.05318.87
5.4.150.0070.05718.93
5.4.140.0130.07016.49
5.4.130.0030.05316.25
5.4.120.0130.04716.27
5.4.110.0070.05316.41
5.4.100.0070.05716.44
5.4.90.0070.04716.45
5.4.80.0070.04716.50
5.4.70.0100.04716.50
5.4.60.0000.05316.47
5.4.50.0170.04016.41
5.4.40.0100.04716.53
5.4.30.0200.03716.41
5.4.20.0000.05316.22
5.4.10.0100.04716.46
5.4.00.0000.05315.70
5.3.290.0060.03912.80
5.3.280.0030.05314.74
5.3.270.0030.05314.47
5.3.260.0130.05314.76
5.3.250.0130.04714.52
5.3.240.0100.04714.60
5.3.230.0130.05714.59
5.3.220.0070.05014.73
5.3.210.0100.06714.45
5.3.200.0070.04714.66
5.3.190.0100.05014.61
5.3.180.0070.05014.65
5.3.170.0070.05314.56
5.3.160.0000.05714.58
5.3.150.0030.06714.47
5.3.140.0100.04714.55
5.3.130.0030.06714.56
5.3.120.0170.05014.56
5.3.110.0100.05014.64
5.3.100.0100.07313.73
5.3.90.0070.05313.79
5.3.80.0000.05713.93
5.3.70.0070.04714.11
5.3.60.0030.05014.09
5.3.50.0170.03713.89
5.3.40.0070.05713.67
5.3.30.0070.04713.76
5.3.20.0030.05313.54
5.3.10.0130.04313.52
5.3.00.0200.03713.41
5.2.170.0070.04011.04
5.2.160.0100.03311.15
5.2.150.0030.04310.90
5.2.140.0000.05011.05
5.2.130.0130.03310.93
5.2.120.0100.03311.11
5.2.110.0030.04011.01
5.2.100.0030.04311.12
5.2.90.0030.04311.11
5.2.80.0070.04011.11
5.2.70.0130.03711.02
5.2.60.0070.04011.05
5.2.50.0030.04310.78
5.2.40.0070.04311.00
5.2.30.0100.05010.90
5.2.20.0100.04710.88
5.2.10.0100.03310.68
5.2.00.0100.04310.69
5.1.60.0030.04710.05
5.1.50.0030.03710.04
5.1.40.0000.03710.06
5.1.30.0030.03710.41
5.1.20.0070.03710.52
5.1.10.0000.04010.25
5.1.00.0070.03310.15
5.0.50.0070.0308.54
5.0.40.0030.0278.49
5.0.30.0030.0438.45
5.0.20.0030.0338.14
5.0.10.0000.0308.13
5.0.00.0030.0408.07
4.4.90.0030.0307.32
4.4.80.0070.0177.32
4.4.70.0030.0207.32
4.4.60.0030.0207.32
4.4.50.0000.0237.32
4.4.40.0030.0337.32
4.4.30.0030.0207.32
4.4.20.0070.0207.32
4.4.10.0030.0207.32
4.4.00.0070.0307.32
4.3.110.0030.0237.32
4.3.100.0000.0307.32
4.3.90.0000.0237.32
4.3.80.0030.0437.32
4.3.70.0030.0207.32
4.3.60.0000.0207.32
4.3.50.0000.0237.32
4.3.40.0030.0307.32
4.3.30.0030.0207.32
4.3.20.0000.0237.32
4.3.10.0000.0307.32
4.3.00.0000.0237.96

preferences:
46.29 ms | 401 KiB | 5 Q