3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooIterator extends ArrayIterator{ function __construct(){ throw new Exception; } } class Foo implements IteratorAggregate{ function getIterator(){ return new FooIterator(); } } function baz(){ $x = new Foo; foreach($x as $y => $z); } function bar(){ baz(); } function rofl(){ bar(); } function lol(){ rofl(); } lol();

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.70.0060.01016.63
8.3.60.0120.00618.43
8.3.50.0270.00721.03
8.3.40.0090.00918.88
8.3.30.0090.00918.85
8.3.20.0050.00220.16
8.3.10.0040.00423.66
8.3.00.0080.00019.69
8.2.180.0090.00618.54
8.2.170.0130.00722.96
8.2.160.0070.00720.32
8.2.150.0080.00024.18
8.2.140.0090.00624.66
8.2.130.0070.00026.16
8.2.120.0080.00017.75
8.2.110.0000.01022.25
8.2.100.0040.00817.75
8.2.90.0090.00019.25
8.2.80.0050.00317.97
8.2.70.0000.00817.63
8.2.60.0080.00017.88
8.2.50.0000.00818.07
8.2.40.0040.00419.47
8.2.30.0000.00719.96
8.2.20.0040.00417.81
8.2.10.0050.00318.06
8.2.00.0000.00717.93
8.1.280.0120.00325.92
8.1.270.0040.00420.26
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0100.01022.58
8.1.230.0120.00017.48
8.1.220.0050.00317.77
8.1.210.0080.00018.77
8.1.200.0030.00717.22
8.1.190.0060.00317.23
8.1.180.0000.00718.10
8.1.170.0050.00318.65
8.1.160.0040.00422.02
8.1.150.0040.00418.96
8.1.140.0080.00017.39
8.1.130.0000.00717.68
8.1.120.0000.00717.55
8.1.110.0050.00517.37
8.1.100.0040.00417.29
8.1.90.0080.00017.49
8.1.80.0060.00317.37
8.1.70.0070.00017.46
8.1.60.0000.00917.60
8.1.50.0080.00017.55
8.1.40.0090.00017.40
8.1.30.0000.00917.58
8.1.20.0000.00717.69
8.1.10.0000.00717.52
8.1.00.0000.00817.59
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.32
8.0.270.0000.00717.20
8.0.260.0080.00017.25
8.0.250.0040.00417.05
8.0.240.0030.00317.07
8.0.230.0070.00317.07
8.0.220.0030.00316.89
8.0.210.0030.00517.00
8.0.200.0030.00317.02
8.0.190.0060.00317.05
8.0.180.0040.00417.03
8.0.170.0050.00516.96
8.0.160.0000.00716.93
8.0.150.0070.00016.90
8.0.140.0040.00416.81
8.0.130.0080.00013.41
8.0.120.0000.00716.89
8.0.110.0000.00816.91
8.0.100.0080.00016.80
8.0.90.0000.00817.02
8.0.80.0110.00416.97
8.0.70.0000.00716.96
8.0.60.0030.00316.83
8.0.50.0000.00716.97
8.0.30.0080.01017.14
8.0.20.0200.00617.40
8.0.10.0070.00017.13
8.0.00.0100.01116.79
7.4.330.0060.00015.14
7.4.320.0040.00416.42
7.4.300.0000.00616.61
7.4.290.0000.00716.59
7.4.280.0040.00416.49
7.4.270.0030.00616.52
7.4.260.0070.00016.59
7.4.250.0000.00716.59
7.4.240.0030.00516.57
7.4.230.0070.00016.50
7.4.220.0060.01816.63
7.4.210.0100.01016.48
7.4.200.0030.00316.68
7.4.160.0130.00716.41
7.4.150.0180.00617.40
7.4.140.0140.00917.86
7.4.130.0110.00516.62
7.4.120.0110.00816.50
7.4.110.0150.00316.46
7.4.100.0080.00816.40
7.4.90.0100.00616.71
7.4.80.0070.01019.39
7.4.70.0040.01416.52
7.4.60.0100.00616.82
7.4.50.0040.00016.23
7.4.40.0030.01316.54
7.4.30.0160.00616.64
7.4.00.0040.01214.98
7.3.330.0050.00013.30
7.3.320.0030.00313.30
7.3.310.0020.00516.30
7.3.300.0000.00616.38
7.3.290.0070.01116.41
7.3.280.0080.00816.38
7.3.270.0120.00617.40
7.3.260.0100.00716.42
7.3.250.0060.01216.48
7.3.240.0150.00316.60
7.3.230.0090.00916.62
7.3.210.0000.01616.54
7.3.200.0060.01116.68
7.3.190.0080.00916.49
7.3.180.0030.01416.63
7.3.170.0100.00716.44
7.3.160.0060.01016.59
7.2.330.0060.01216.77
7.2.320.0170.00716.64
7.2.310.0070.01016.86
7.2.300.0060.01216.59
7.2.290.0120.00616.42
7.2.80.0080.00416.54
7.2.60.0100.00317.12
7.2.00.0070.00719.41
7.1.200.0040.01115.88
7.1.100.0030.00818.02
7.1.70.0050.00517.25
7.1.60.0130.00719.17
7.1.50.0140.01734.76
7.1.00.0000.08022.31
7.0.200.0100.00016.79
7.0.60.0030.08720.00
7.0.50.0100.07717.85
7.0.40.0070.05719.96
7.0.30.0370.08020.34
7.0.20.0370.08020.23
7.0.10.0030.05320.21
7.0.00.0070.08320.24
5.6.280.0100.06021.04
5.6.210.0170.05020.71
5.6.200.0070.06718.22
5.6.190.0030.05020.55
5.6.180.0330.03720.34
5.6.170.0300.07020.50
5.6.160.0030.06020.51
5.6.150.0130.07318.15
5.6.140.0130.06018.18
5.6.130.0000.06718.25
5.6.120.0170.03021.02
5.6.110.0100.03321.03
5.6.100.0000.04720.99
5.6.90.0130.07321.00
5.6.80.0170.03720.54
5.6.70.4570.03320.38
5.5.350.0100.08320.42
5.5.340.0000.09017.96
5.5.330.0030.04320.40
5.5.320.0200.04720.42
5.5.310.0230.09020.41
5.5.300.0030.04018.07
5.5.290.0130.07317.97
5.5.280.0030.05020.79
5.5.270.0100.07720.81
5.5.260.0100.08320.98
5.5.250.0130.07020.70
5.5.240.0070.07020.34
5.4.450.0700.05719.42
5.4.440.0730.07019.24
5.4.430.0630.06319.24
5.4.420.0900.03719.56
5.4.410.0700.05319.34
5.4.400.0800.04319.27
5.4.390.0900.06019.01
5.4.380.0870.05318.84
5.4.370.0900.05319.05
5.4.360.0870.05319.05
5.4.350.0830.05719.08
5.4.340.0900.05018.92
5.4.320.1000.04719.31
5.4.310.0870.05019.06
5.4.300.0870.05018.93
5.4.290.0870.05019.10
5.4.280.0870.06018.87
5.4.270.0900.05019.24
5.4.260.0970.04719.06
5.4.250.0870.05019.26
5.4.240.0900.05019.19
5.4.230.0900.05019.09
5.4.220.0670.06019.19
5.4.210.0930.04319.08
5.4.200.0730.05019.05
5.4.190.0770.04719.20
5.4.180.0770.06718.85
5.4.170.0700.05319.21
5.4.160.0730.06319.20
5.4.150.0730.05019.22
5.4.140.0700.05316.59
5.4.130.0770.04316.59
5.4.120.0670.05316.37
5.4.110.0770.04716.61
5.4.100.0630.05716.51
5.4.90.0670.05016.51
5.4.80.0930.06016.57
5.4.70.0200.03016.39
5.4.60.0300.06016.44
5.4.50.0070.04016.34
5.4.40.0030.05316.26
5.4.30.0030.07016.17
5.4.20.0130.05716.54

preferences:
46.39 ms | 401 KiB | 5 Q