3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bla implements Iterator { private $pos = 0; public function __construct() { $this->pos = 0; } function rewind() { $this->pos = 0; } function current() { return $this->pos; } function key() { return $this->pos; } function next() { $this->pos++; } function valid() { return $this->pos < 3; } } echo "results:"; function arrara() { $bla = new Bla(); $i = 0; foreach($bla as $a) { foreach ($bla as $b) { echo "($a, $b)<br />"; $i++; if ($i > 20) return; } if ($i > 20) return; } } arrara();

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.0110.00318.43
8.3.50.0080.01021.21
8.3.40.0090.00918.97
8.3.30.0040.01120.17
8.3.20.0090.00020.22
8.3.10.0000.00722.09
8.3.00.0040.00422.39
8.2.180.0090.00616.88
8.2.170.0000.01422.96
8.2.160.0110.00420.35
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0130.00326.16
8.2.120.0060.00319.77
8.2.110.0040.00422.30
8.2.100.0070.00419.33
8.2.90.0050.00319.22
8.2.80.0070.00019.25
8.2.70.0030.00617.50
8.2.60.0040.00418.04
8.2.50.0040.00418.07
8.2.40.0040.00418.34
8.2.30.0000.00818.20
8.2.20.0040.00417.71
8.2.10.0030.00517.66
8.2.00.0030.00617.82
8.1.280.0100.00725.92
8.1.270.0040.01120.44
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00723.84
8.1.230.0110.00018.89
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0000.00817.53
8.1.180.0040.00418.72
8.1.170.0030.00518.46
8.1.160.0000.00722.15
8.1.150.0000.00718.64
8.1.140.0040.00417.37
8.1.130.0030.00317.83
8.1.120.0030.00517.40
8.1.110.0000.00817.31
8.1.100.0050.00217.38
8.1.90.0030.00417.31
8.1.80.0020.00517.30
8.1.70.0030.00317.47
8.1.60.0040.00417.47
8.1.50.0000.00817.41
8.1.40.0000.00817.48
8.1.30.0050.00217.55
8.1.20.0050.00317.56
8.1.10.0050.00217.56
8.1.00.0080.00017.56
8.0.300.0030.00618.77
8.0.290.0070.00017.03
8.0.280.0030.00518.42
8.0.270.0030.00317.18
8.0.260.0060.00016.84
8.0.250.0070.00016.87
8.0.240.0030.00516.88
8.0.230.0030.00316.82
8.0.220.0000.00716.88
8.0.210.0000.00716.84
8.0.200.0030.00516.83
8.0.190.0000.00816.94
8.0.180.0050.00216.83
8.0.170.0000.00816.93
8.0.160.0030.00316.92
8.0.150.0070.00016.97
8.0.140.0040.00416.84
8.0.130.0070.00013.38
8.0.120.0020.00516.75
8.0.110.0040.00416.89
8.0.100.0080.00016.83
8.0.90.0040.00416.77
8.0.80.0150.00616.85
8.0.70.0030.00516.73
8.0.60.0040.00416.86
8.0.50.0040.00416.95
8.0.30.0100.01316.84
8.0.20.0090.01217.40
8.0.10.0000.00716.93
8.0.00.0070.01416.80
7.4.330.0050.00015.00
7.4.320.0000.00616.61
7.4.300.0030.00316.56
7.4.290.0030.00316.49
7.4.280.0030.00316.59
7.4.270.0030.00316.50
7.4.260.0030.00616.57
7.4.250.0000.00816.52
7.4.240.0040.00316.61
7.4.230.0070.00016.68
7.4.220.0060.01516.51
7.4.210.0080.00716.64
7.4.200.0070.00016.51
7.4.190.0000.00716.48
7.4.160.0090.00916.50
7.4.150.0180.00017.40
7.4.140.0080.01017.86
7.4.130.0110.00816.52
7.4.120.0060.01316.60
7.4.110.0030.01316.49
7.4.100.0100.00716.67
7.4.90.0150.00316.39
7.4.80.0140.00319.39
7.4.70.0080.00816.55
7.4.60.0100.01316.48
7.4.50.0030.00316.45
7.4.40.0040.01422.77
7.4.30.0100.01016.50
7.4.00.0060.00914.98
7.3.330.0030.00313.33
7.3.320.0030.00313.13
7.3.310.0000.00716.30
7.3.300.0080.00016.41
7.3.290.0090.00916.38
7.3.280.0110.00616.32
7.3.270.0120.00617.40
7.3.260.0170.00016.34
7.3.250.0100.01016.62
7.3.240.0140.00816.38
7.3.230.0030.01716.42
7.3.210.0080.00816.40
7.3.200.0160.00619.39
7.3.190.0120.00916.33
7.3.180.0110.00516.32
7.3.170.0040.01216.54
7.3.160.0120.00316.29
7.3.120.0060.00614.65
7.2.330.0130.00616.42
7.2.320.0100.00716.75
7.2.310.0060.01016.64
7.2.300.0100.00716.55
7.2.290.0090.00916.79
7.2.00.0060.00819.58
7.1.100.0030.00518.16
7.1.70.0020.00517.13
7.1.60.0060.01219.40
7.1.50.0090.00616.89
7.1.00.0000.03722.40
7.0.200.0000.00916.79
7.0.140.0100.06322.00
7.0.60.0100.08319.96
7.0.50.0030.04317.89
7.0.40.0170.06320.02
7.0.30.0300.05320.21
7.0.20.0270.07020.08
7.0.10.0430.07320.24
7.0.00.0130.05020.21
5.6.280.0000.07320.87
5.6.210.0030.04020.48
5.6.200.0070.04318.13
5.6.190.0100.08320.47
5.6.180.3970.05020.28
5.6.170.0370.06720.59
5.6.160.0100.08320.66
5.6.150.0100.07718.28
5.6.140.0070.04318.14
5.6.130.0030.04318.15
5.6.120.0170.07321.09
5.6.110.0230.06720.95
5.6.100.0200.06720.94
5.6.90.0170.07021.14
5.6.80.0070.04720.55
5.6.70.0170.07320.43
5.5.350.0070.04320.44
5.5.340.0070.05317.98
5.5.330.0100.07020.32
5.5.320.0200.04320.34
5.5.310.0330.07720.39
5.5.300.0030.05017.97
5.5.290.0270.05718.08
5.5.280.0100.05320.88
5.5.270.0100.08720.69
5.5.260.0030.06020.76
5.5.250.0000.04320.70
5.5.240.0100.07020.27
5.4.450.0630.05719.47
5.4.440.0700.05319.45
5.4.430.0870.04319.48
5.4.420.0330.05719.47
5.4.410.0730.05319.50
5.4.400.0670.06718.64
5.4.390.0530.05718.75
5.4.380.0270.05318.84
5.4.370.0130.05318.61
5.4.360.0200.04318.51
5.4.350.0110.03512.02
5.4.340.0060.04212.02
5.4.320.0100.03912.51
5.4.310.0080.03812.50
5.4.300.0080.04612.51
5.4.290.0080.03912.50
5.4.280.0050.04012.40
5.4.270.0090.03712.41
5.4.260.0050.04612.41
5.4.250.0070.05318.82
5.4.240.0030.05718.88
5.4.230.0100.05318.92
5.4.220.0100.05718.97
5.4.210.0070.05018.91
5.4.200.0030.05318.94
5.4.190.0030.05318.94
5.4.180.0070.05018.81
5.4.170.0130.04318.91
5.4.160.0130.06318.81
5.4.150.0070.05718.76
5.4.140.0070.05316.65
5.4.130.0130.04316.43
5.4.120.0130.04316.36
5.4.110.0070.05016.68
5.4.100.0070.05016.54
5.4.90.0030.05016.51
5.4.80.0100.05016.53
5.4.70.0100.05316.42
5.4.60.0200.04716.42
5.4.50.0070.05316.31
5.4.40.0000.05316.36
5.4.30.0230.03016.36
5.4.20.0070.06016.59
5.4.10.0130.04316.38
5.4.00.0030.05315.85
5.3.290.0110.05512.80
5.3.280.0070.05014.59
5.3.270.0100.05014.76
5.3.260.0030.05314.75
5.3.250.0130.04014.71
5.3.240.0100.05014.52
5.3.230.0130.04714.57
5.3.220.0100.05014.48
5.3.210.0070.05014.75
5.3.200.0130.04314.41
5.3.190.0070.05314.57
5.3.180.0130.04314.47
5.3.170.0100.06714.58
5.3.160.0200.03714.66
5.3.150.0100.06314.56
5.3.140.0070.05014.73
5.3.130.0070.05014.53
5.3.120.0030.05314.57
5.3.110.0030.05314.72
5.3.100.0100.04314.02
5.3.90.0000.06014.01
5.3.80.0000.05313.95
5.3.70.0070.04714.12
5.3.60.0130.06014.01
5.3.50.0000.05314.04
5.3.40.0130.05013.95
5.3.30.0070.04713.75
5.3.20.0070.05313.72
5.3.10.0070.04313.75
5.3.00.0070.04713.55
5.2.170.0070.04011.33
5.2.160.0070.03711.24
5.2.150.0100.03711.24
5.2.140.0070.03710.98
5.2.130.0000.04311.01
5.2.120.0070.03711.12
5.2.110.0030.04011.21
5.2.100.0100.03311.19
5.2.90.0000.04311.06
5.2.80.0130.04011.00
5.2.70.0030.04311.32
5.2.60.0030.04311.24
5.2.50.0130.03311.10
5.2.40.0100.03711.17
5.2.30.0030.04310.98
5.2.20.0000.04310.94
5.2.10.0130.03010.95
5.2.00.0070.03710.63
5.1.60.0030.0339.98
5.1.50.0070.03710.20
5.1.40.0000.03710.08
5.1.30.0000.03710.42
5.1.20.0030.03710.32
5.1.10.0070.0379.91
5.1.00.0000.03710.23
5.0.50.0070.0278.67
5.0.40.0070.0238.42
5.0.30.0030.0438.29
5.0.20.0000.0308.25
5.0.10.0070.0278.25
5.0.00.0030.0408.38
4.4.90.0000.0237.62
4.4.80.0100.0237.62
4.4.70.0030.0207.62
4.4.60.0030.0237.62
4.4.50.0070.0177.62
4.4.40.0030.0337.62
4.4.30.0000.0337.62
4.4.20.0030.0207.62
4.4.10.0100.0137.62
4.4.00.0070.0277.62
4.3.110.0030.0207.62
4.3.100.0000.0237.62
4.3.90.0030.0207.62
4.3.80.0070.0277.62
4.3.70.0000.0207.62
4.3.60.0000.0237.62
4.3.50.0000.0237.62
4.3.40.0000.0377.62
4.3.30.0000.0237.62
4.3.20.0000.0237.62
4.3.10.0000.0237.62
4.3.00.0030.0237.96

preferences:
50.19 ms | 401 KiB | 5 Q