3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = new ArrayObject(array(1, 2)); $it = $array->getIterator(); while ($it->valid()) { $it->next(); echo $it->offsetGet(0); } $it->append(array(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.40.0110.00718.85
8.3.30.0100.00320.31
8.3.20.0000.00720.16
8.3.10.0000.00822.09
8.3.00.0030.00522.59
8.2.170.0070.01022.96
8.2.160.0120.00320.39
8.2.150.0030.00524.18
8.2.140.0120.00824.66
8.2.130.0060.00326.16
8.2.120.0050.00319.60
8.2.110.0100.01022.01
8.2.100.0040.00719.21
8.2.90.0030.00619.23
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0030.00517.80
8.2.50.0040.00418.07
8.2.40.0050.00317.97
8.2.30.0040.00418.06
8.2.20.0020.00517.66
8.2.10.0050.00317.59
8.2.00.0030.00717.56
8.1.270.0060.00320.27
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0040.00424.02
8.1.230.0090.00319.16
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.22
8.1.190.0000.00817.52
8.1.180.0050.00318.73
8.1.170.0050.00318.65
8.1.160.0000.00722.05
8.1.150.0070.00018.58
8.1.140.0040.00417.39
8.1.130.0070.00017.84
8.1.120.0050.00317.30
8.1.110.0000.00717.41
8.1.100.0000.00717.36
8.1.90.0070.00017.23
8.1.80.0000.00717.37
8.1.70.0000.00817.39
8.1.60.0060.00317.41
8.1.50.0030.00617.36
8.1.40.0000.00817.43
8.1.30.0000.00817.61
8.1.20.0040.00417.55
8.1.10.0070.00017.46
8.1.00.0050.00317.39
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0080.00018.46
8.0.270.0030.00317.24
8.0.260.0000.00716.93
8.0.250.0000.00717.02
8.0.240.0040.00416.92
8.0.230.0030.00316.85
8.0.220.0000.00716.88
8.0.210.0030.00316.76
8.0.200.0030.00317.00
8.0.190.0050.00316.84
8.0.180.0000.00816.86
8.0.170.0040.00416.96
8.0.160.0000.00716.96
8.0.150.0000.00716.86
8.0.140.0030.00516.86
8.0.130.0050.00013.36
8.0.120.0040.00416.77
8.0.110.0000.00816.98
8.0.100.0000.00716.76
8.0.90.0000.00716.85
8.0.80.0090.01216.89
8.0.70.0030.00616.89
8.0.60.0040.00416.89
8.0.50.0070.00016.77
8.0.30.0130.00617.19
8.0.20.0100.00917.40
8.0.10.0070.00017.02
8.0.00.0120.00716.70
7.4.330.0050.00015.00
7.4.320.0000.00716.44
7.4.300.0000.00616.49
7.4.290.0040.00416.40
7.4.280.0040.00416.53
7.4.270.0000.00716.39
7.4.260.0030.00716.32
7.4.250.0040.00416.51
7.4.240.0050.00216.47
7.4.230.0000.00716.62
7.4.220.0090.01216.65
7.4.210.0100.00316.44
7.4.200.0000.00716.38
7.4.190.0000.00816.45
7.4.160.0120.00916.59
7.4.150.0080.00817.40
7.4.140.0080.01017.86
7.4.130.0100.01116.55
7.4.120.0080.01016.44
7.4.110.0120.00616.47
7.4.100.0030.01416.50
7.4.90.0090.00916.57
7.4.80.0070.01319.39
7.4.70.0120.00416.60
7.4.60.0090.00916.53
7.4.50.0030.00316.59
7.4.40.0120.00622.77
7.4.30.0080.00816.53
7.4.10.0000.01914.95
7.4.00.0040.01214.87
7.3.330.0000.00613.01
7.3.320.0000.00613.11
7.3.310.0030.00316.07
7.3.300.0000.00716.28
7.3.290.0080.00916.16
7.3.280.0080.00616.17
7.3.270.0130.01017.40
7.3.260.0070.01316.48
7.3.250.0090.00816.28
7.3.240.0030.01316.45
7.3.230.0100.00616.39
7.3.210.0030.01416.26
7.3.200.0200.00319.39
7.3.190.0150.00416.25
7.3.180.0160.00016.16
7.3.170.0060.01016.34
7.3.160.0090.01216.37
7.3.130.0030.01014.46
7.3.120.0070.00914.78
7.3.110.0160.00314.35
7.3.100.0050.00514.94
7.3.90.0030.01014.73
7.3.80.0030.00614.81
7.3.70.0080.00614.52
7.3.60.0100.00314.68
7.3.50.0040.01114.73
7.3.40.0070.00714.65
7.3.30.0030.00714.73
7.3.20.0120.00316.63
7.3.10.0070.00716.55
7.3.00.0060.00616.36
7.2.330.0180.00316.38
7.2.320.0070.01016.63
7.2.310.0170.00016.65
7.2.300.0100.00716.48
7.2.290.0030.01416.71
7.2.260.0070.01114.77
7.2.250.0110.00715.14
7.2.240.0040.01115.15
7.2.230.0060.00915.14
7.2.220.0090.00614.91
7.2.210.0000.00914.86
7.2.200.0000.01415.11
7.2.190.0030.00915.04
7.2.180.0100.00314.71
7.2.170.0000.01514.85
7.2.160.0000.01414.74
7.2.150.0070.00316.44
7.2.140.0040.01116.66
7.2.130.0060.01016.75
7.2.120.0030.00616.85
7.2.110.0000.01316.74
7.2.100.0110.00416.66
7.2.90.0090.00616.72
7.2.80.0030.01416.85
7.2.70.0080.00416.93
7.2.60.0060.00816.81
7.2.50.0060.00916.70
7.2.40.0000.01316.45
7.2.30.0090.00616.87
7.2.20.0070.00716.71
7.2.10.0090.00616.66
7.2.00.0030.00918.10
7.1.330.0040.01115.61
7.1.320.0030.01015.74
7.1.310.0030.01015.64
7.1.300.0030.00915.66
7.1.290.0000.00915.36
7.1.280.0000.01115.58
7.1.270.0060.00615.43
7.1.260.0070.00715.76
7.1.250.0030.00915.46
7.1.240.0040.01115.63
7.1.230.0070.00315.57
7.1.220.0070.00715.59
7.1.210.0030.00615.45
7.1.200.0220.00415.46
7.1.190.0030.00915.38
7.1.180.0060.00315.75
7.1.170.0030.00715.55
7.1.160.0070.01015.62
7.1.150.0030.00915.63
7.1.140.0060.01015.41
7.1.130.0090.00615.23
7.1.120.0030.00615.66
7.1.110.0110.00315.32
7.1.100.0070.00816.74
7.1.90.0060.00815.41
7.1.80.0070.00415.55
7.1.70.0010.00916.30
7.1.60.0090.00517.50
7.1.50.0060.00816.27
7.1.40.0090.00615.52
7.1.30.0070.00415.50
7.1.20.0070.00415.66
7.1.10.0090.00615.61
7.1.00.0060.01919.07
7.0.330.0070.00715.35
7.0.320.0030.00715.16
7.0.310.0030.00915.32
7.0.300.0000.00915.32
7.0.290.0040.01115.17
7.0.280.0070.00315.32
7.0.270.0030.00715.03
7.0.260.0080.00015.07
7.0.250.0000.00815.34
7.0.240.0100.00615.13
7.0.230.0090.00415.32
7.0.220.0000.01414.92
7.0.210.0060.00915.00
7.0.200.0020.01115.85
7.0.190.0000.01515.42
7.0.180.0030.01315.29
7.0.170.0060.00615.09
7.0.160.0000.01015.32
7.0.150.0080.00015.10
7.0.140.0030.04118.57
7.0.130.0000.01415.20
7.0.120.0000.01015.02
7.0.110.0000.01015.14
7.0.100.0060.00615.23
7.0.90.0000.01115.32
7.0.80.0060.00915.01
7.0.70.0050.00515.45
7.0.60.0090.04217.58
7.0.50.0100.04016.57
7.0.40.0020.03316.81
7.0.30.0120.02816.81
7.0.20.0140.04416.74
7.0.10.0030.02716.66
7.0.00.0050.03416.53
5.6.400.0080.00814.22
5.6.390.0070.00714.34
5.6.380.0070.00714.11
5.6.370.0120.00314.32
5.6.360.0090.00314.45
5.6.350.0060.00614.20
5.6.340.0040.00814.45
5.6.330.0070.00714.36
5.6.320.0030.01014.36
5.6.310.0070.00714.16
5.6.300.0060.00313.93
5.6.290.0030.01014.35
5.6.280.0020.04317.58
5.6.270.0070.00414.33
5.6.260.0080.00613.91
5.6.250.0100.00314.09
5.6.240.0040.01214.18
5.6.230.0000.01014.30
5.6.220.0120.00014.51
5.6.210.0050.03217.30
5.6.200.0060.02116.29
5.6.190.0050.03817.48
5.6.180.0210.02217.42
5.6.170.0200.03517.32
5.6.160.0070.02417.31
5.6.150.0080.01816.28
5.6.140.0080.04016.17
5.6.130.0070.04216.15
5.6.120.0050.04717.57
5.6.110.0120.04017.67
5.6.100.0100.04417.66
5.6.90.0080.04317.63
5.6.80.0060.02817.35
5.6.70.0070.01114.00
5.6.60.0070.00714.18
5.6.50.0100.00314.02
5.6.40.0050.00514.29
5.6.30.0030.00614.07
5.6.20.0040.00414.27
5.6.10.0030.00614.09
5.6.00.0040.00714.22
5.5.380.0070.00714.12
5.5.370.0110.00314.31
5.5.360.0090.00613.92
5.5.350.0170.04017.11
5.5.340.0090.04216.16
5.5.330.0080.04217.22
5.5.320.0180.02717.14
5.5.310.0180.04317.28
5.5.300.0080.04216.00
5.5.290.0090.04416.12
5.5.280.0030.03217.40
5.5.270.0060.02417.58
5.5.260.0030.04317.53
5.5.250.0150.03617.30
5.5.240.0050.04617.06
5.5.230.0060.00613.95
5.5.220.0080.00313.88
5.5.210.0080.00414.21
5.5.200.0160.00013.93
5.5.190.0100.00014.29
5.5.180.0040.00814.07
5.5.170.0120.00314.33
5.5.160.0030.01114.25
5.5.150.0110.00313.97
5.5.140.0000.01313.96
5.5.130.0070.00714.15
5.5.120.0060.00313.92
5.5.110.0090.00013.91
5.5.100.0030.01014.05
5.5.90.0090.00614.25
5.5.80.0040.01213.81
5.5.70.0060.00314.44
5.5.60.0120.00414.27
5.5.50.0030.01414.16
5.5.40.0040.00714.23
5.5.30.0000.01514.19
5.5.20.0000.01414.30
5.5.10.0110.00413.63
5.5.00.0070.00314.09
5.4.450.0250.03316.02
5.4.440.0330.03116.06
5.4.430.0130.02315.99
5.4.420.0090.03016.17
5.4.410.0060.03216.14
5.4.400.0130.02515.75
5.4.390.0530.03715.65
5.4.380.0130.03215.71
5.4.370.0080.03015.73
5.4.360.0030.03315.75
5.4.350.0110.03212.35
5.4.340.0080.02712.34
5.4.330.0000.00712.72
5.4.320.0070.01712.59
5.4.310.0080.02012.58
5.4.300.0040.02212.59
5.4.290.0070.02312.58
5.4.280.0100.02712.53
5.4.270.0050.02212.53
5.4.260.0070.02312.53
5.4.250.0130.03315.76
5.4.240.0030.03115.75
5.4.230.0060.03215.75
5.4.220.0080.02815.81
5.4.210.0050.02715.81
5.4.200.0030.03015.73
5.4.190.0020.03415.82
5.4.180.0100.02515.77
5.4.170.0100.02815.85
5.4.160.0030.03015.74
5.4.150.0070.02815.74
5.4.140.0070.02514.63
5.4.130.0120.03214.49
5.4.120.0070.02714.49
5.4.110.0030.03014.62
5.4.100.0050.02814.60
5.4.90.0070.03614.54
5.4.80.0030.03014.58
5.4.70.0020.03014.53
5.4.60.0030.02714.52
5.4.50.0050.02614.55
5.4.40.0050.03814.63
5.4.30.0030.03214.55
5.4.20.0080.02614.57
5.4.10.0080.02614.60
5.4.00.0060.02614.22
5.3.290.0050.02112.76
5.3.280.0060.02813.62
5.3.270.0050.03013.55
5.3.260.0050.03013.51
5.3.250.0030.03013.71
5.3.240.0100.02713.62
5.3.230.0070.02713.73
5.3.220.0090.02513.58
5.3.210.0030.03013.49
5.3.200.0050.02713.53
5.3.190.0080.02713.57
5.3.180.0030.02913.69
5.3.170.0030.03513.58
5.3.160.0030.02813.64
5.3.150.0070.03413.69
5.3.140.0140.03113.59
5.3.130.0040.03113.68
5.3.120.0070.03613.55
5.3.110.0060.02913.64
5.3.100.0030.03113.37
5.3.90.0070.02713.38
5.3.80.0100.03513.25
5.3.70.0030.03113.30
5.3.60.0090.02613.38
5.3.50.0060.02613.22
5.3.40.0120.03113.34
5.3.30.0050.02913.32
5.3.20.0130.02813.14
5.3.10.0020.03313.19
5.3.00.0080.02513.18
5.2.170.0230.04011.04
5.2.160.0070.05310.89
5.2.150.0070.04011.04
5.2.140.0030.05311.23
5.2.130.0000.04311.02
5.2.120.0070.03711.04
5.2.110.0170.03011.13
5.2.100.0100.03311.10
5.2.90.0030.04311.00
5.2.80.0070.04011.09
5.2.70.0100.05311.01
5.2.60.0070.03711.08
5.2.50.0000.04311.11
5.2.40.0070.04310.88
5.2.30.0030.04310.81
5.2.20.0070.03710.72
5.2.10.0030.04310.82
5.2.00.0070.03710.79
5.1.60.0030.04310.04
5.1.50.0000.04010.07
5.1.40.0030.03710.21
5.1.30.0100.05010.30
5.1.20.0100.04010.41
5.1.10.0100.03010.11
5.1.00.0100.0409.91
5.0.50.0100.0208.48
5.0.40.0070.0238.49
5.0.30.0000.0438.36
5.0.20.0070.0238.25
5.0.10.0000.0378.08
5.0.00.0030.0438.07
4.4.90.0070.0177.35
4.4.80.0000.0237.35
4.4.70.0000.0337.35
4.4.60.0030.0237.35
4.4.50.0100.0207.35
4.4.40.0030.0337.35
4.4.30.0030.0277.35
4.4.20.0070.0177.35
4.4.10.0000.0237.35
4.4.00.0070.0277.35
4.3.110.0000.0237.35
4.3.100.0000.0237.35
4.3.90.0100.0207.35
4.3.80.0030.0337.35
4.3.70.0100.0207.35
4.3.60.0000.0207.35
4.3.50.0030.0207.35
4.3.40.0000.0407.35
4.3.30.0030.0207.35
4.3.20.0030.0207.35
4.3.10.0000.0237.35
4.3.00.0100.0236.97

preferences:
41.3 ms | 400 KiB | 5 Q