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 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.0150.00318.55
8.3.50.0030.01221.27
8.3.40.0140.00318.79
8.3.30.0100.00320.25
8.3.20.0040.00420.31
8.3.10.0080.00021.96
8.3.00.0000.00822.39
8.2.180.0110.00416.75
8.2.170.0120.00622.96
8.2.160.0040.01120.57
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.01126.16
8.2.120.0030.00519.67
8.2.110.0060.00322.27
8.2.100.0110.00019.27
8.2.90.0050.00319.07
8.2.80.0070.00019.32
8.2.70.0060.00317.50
8.2.60.0000.00817.93
8.2.50.0030.00518.07
8.2.40.0050.00318.09
8.2.30.0040.00418.09
8.2.20.0000.00817.65
8.2.10.0000.00717.78
8.2.00.0000.01017.69
8.1.280.0110.00325.92
8.1.270.0080.00820.46
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0040.00423.79
8.1.230.0080.00419.16
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0050.00317.64
8.1.180.0040.00418.86
8.1.170.0000.00818.51
8.1.160.0040.00422.14
8.1.150.0070.00018.65
8.1.140.0020.00517.52
8.1.130.0040.00417.87
8.1.120.0030.00517.48
8.1.110.0080.00017.54
8.1.100.0040.00417.48
8.1.90.0070.00017.48
8.1.80.0040.00417.45
8.1.70.0040.00417.45
8.1.60.0000.00817.56
8.1.50.0040.00417.39
8.1.40.0050.00317.62
8.1.30.0040.00417.49
8.1.20.0030.00617.71
8.1.10.0000.00717.63
8.1.00.0030.00617.49
8.0.300.0040.00418.77
8.0.290.0000.00717.16
8.0.280.0030.00318.39
8.0.270.0070.00017.22
8.0.260.0030.00316.95
8.0.250.0000.00717.08
8.0.240.0040.00417.05
8.0.230.0000.00816.91
8.0.220.0030.00316.92
8.0.210.0000.00716.90
8.0.200.0030.00316.94
8.0.190.0000.00717.00
8.0.180.0040.00417.03
8.0.170.0040.00417.03
8.0.160.0040.00316.79
8.0.150.0000.00816.86
8.0.140.0030.00416.93
8.0.130.0030.00313.46
8.0.120.0070.00016.98
8.0.110.0050.00316.91
8.0.100.0040.00416.77
8.0.90.0000.00717.07
8.0.80.0100.00716.95
8.0.70.0000.00716.86
8.0.60.0000.00716.94
8.0.50.0000.00716.96
8.0.30.0190.00417.18
8.0.20.0100.01217.40
8.0.10.0000.00717.07
8.0.00.0070.01316.72
7.4.330.0030.00315.00
7.4.320.0000.00716.64
7.4.300.0000.00616.50
7.4.290.0070.00016.52
7.4.280.0000.00716.54
7.4.270.0030.00316.53
7.4.260.0070.00316.39
7.4.250.0000.00716.47
7.4.240.0030.00516.62
7.4.230.0040.00416.52
7.4.220.0120.00616.41
7.4.210.0100.00816.62
7.4.200.0040.00416.69
7.4.190.0000.00816.78
7.4.160.0120.00416.47
7.4.150.0190.00617.40
7.4.140.0130.00917.86
7.4.130.0120.00516.62
7.4.120.0090.00916.54
7.4.110.0070.01016.64
7.4.100.0140.00516.55
7.4.90.0130.00616.77
7.4.80.0080.00819.39
7.4.70.0090.00916.66
7.4.60.0110.00916.49
7.4.50.0000.00716.21
7.4.40.0070.01022.77
7.4.30.0110.00916.51
7.4.00.0080.00814.90
7.3.330.0050.00013.38
7.3.320.0000.00513.39
7.3.310.0000.00716.24
7.3.300.0000.00716.31
7.3.290.0030.01016.40
7.3.280.0080.00816.39
7.3.270.0190.00317.40
7.3.260.0110.00716.61
7.3.250.0120.00916.55
7.3.240.0200.00316.45
7.3.230.0060.01116.44
7.3.210.0130.00616.64
7.3.200.0070.01019.39
7.3.190.0040.01216.47
7.3.180.0060.00916.64
7.3.170.0090.00616.46
7.3.160.0150.00716.65
7.3.120.0050.01314.77
7.3.110.0110.00714.80
7.3.100.0070.00714.83
7.3.90.0030.01014.95
7.3.80.0110.00814.58
7.3.70.0080.00514.93
7.3.60.0110.00714.75
7.3.50.0040.01114.96
7.3.40.0030.00914.71
7.3.30.0070.01014.84
7.3.20.0110.00016.66
7.3.10.0030.01316.78
7.3.00.0030.00916.60
7.2.330.0090.00916.70
7.2.320.0080.01216.81
7.2.310.0120.00616.58
7.2.300.0070.01516.73
7.2.290.0100.01316.82
7.2.250.0090.00914.96
7.2.240.0100.01015.23
7.2.230.0100.00615.23
7.2.220.0030.01015.17
7.2.210.0070.01014.68
7.2.200.0130.00714.90
7.2.190.0060.00914.87
7.2.180.0000.01715.06
7.2.170.0060.01314.93
7.2.60.0060.00617.02
7.2.00.0040.01119.59
7.1.330.0000.01815.38
7.1.320.0060.01015.42
7.1.310.0090.00615.75
7.1.300.0040.00815.75
7.1.290.0060.00315.61
7.1.280.0000.01715.49
7.1.270.0090.00915.75
7.1.260.0030.01015.81
7.1.200.0070.00715.84
7.1.100.0000.01518.22
7.1.70.0000.00817.20
7.1.60.0070.01719.40
7.1.50.0130.00916.71
7.1.00.0000.07022.45
7.0.200.0040.00416.52
7.0.140.0000.07721.91
7.0.60.0100.05320.04
7.0.50.0000.04317.81
7.0.40.0030.07720.26
7.0.30.0230.05320.21
7.0.20.0100.06020.22
7.0.10.0030.05320.24
7.0.00.0030.04320.01
5.6.280.0100.06721.16
5.6.210.0100.07720.48
5.6.200.0070.08318.29
5.6.190.0130.04320.48
5.6.180.0200.08020.49
5.6.170.0200.08720.47
5.6.160.0000.04720.56
5.6.150.0070.04018.19
5.6.140.0100.03718.22
5.6.130.0070.08018.18
5.6.120.0030.08021.16
5.6.110.0130.07321.02
5.6.100.0030.08720.96
5.6.90.0230.07020.96
5.6.80.0130.05020.39
5.6.70.3930.03720.39
5.5.350.0270.07320.34
5.5.340.0000.06317.98
5.5.330.0000.07720.47
5.5.320.0170.07020.35
5.5.310.0330.05320.33
5.5.300.0130.07717.95
5.5.290.0000.04717.99
5.5.280.0070.08320.89
5.5.270.0100.08020.80
5.5.260.0030.08720.89
5.5.250.0230.07020.72
5.5.240.0370.06720.25
5.4.450.0830.05319.60
5.4.440.0870.05019.61
5.4.430.0730.06019.30
5.4.420.0530.04719.55
5.4.410.0630.05319.57
5.4.400.1230.06718.51
5.4.390.1000.08718.54
5.4.380.0300.06018.71
5.4.370.0200.04718.59
5.4.360.0170.04718.70
5.4.350.0030.03812.02
5.4.340.0080.03712.02
5.4.320.0050.03912.51
5.4.310.0120.03712.50
5.4.300.0100.04312.51
5.4.290.0040.04012.50
5.4.280.0040.03812.40
5.4.270.0070.03812.40
5.4.260.0040.04512.41
5.4.250.0000.05718.74
5.4.240.0100.05018.81
5.4.230.0100.05018.78
5.4.220.0030.05718.63
5.4.210.0030.05318.77
5.4.200.0100.04718.63
5.4.190.0100.05318.98
5.4.180.0100.07318.94
5.4.170.0030.05719.00
5.4.160.0030.05718.96
5.4.150.0130.05018.68
5.4.140.0100.04716.48
5.4.130.0030.05016.54
5.4.120.0030.05716.58
5.4.110.0030.05716.52
5.4.100.0170.03716.64
5.4.90.0170.04016.52
5.4.80.0100.04316.43
5.4.70.0100.06316.38
5.4.60.0030.05316.42
5.4.50.0130.04316.44
5.4.40.0000.05316.52
5.4.30.0100.04716.51
5.4.20.0000.05716.33
5.4.10.0100.05016.45
5.4.00.0100.04315.80
5.3.290.0060.04212.80
5.3.280.0070.05714.51
5.3.270.0070.05314.70
5.3.260.0070.05314.70
5.3.250.0100.04714.69
5.3.240.0130.04714.71
5.3.230.0100.04714.78
5.3.220.0030.06314.56
5.3.210.0070.05014.66
5.3.200.0130.07014.67
5.3.190.0030.05714.66
5.3.180.0130.04714.59
5.3.170.0070.05014.57
5.3.160.0070.05014.56
5.3.150.0070.05314.40
5.3.140.0130.04314.39
5.3.130.0170.04314.78
5.3.120.0100.05014.69
5.3.110.0100.05014.78
5.3.100.0070.05014.27
5.3.90.0100.05714.11
5.3.80.0100.05714.01
5.3.70.0100.04714.09
5.3.60.0070.04714.17
5.3.50.0130.04713.95
5.3.40.0030.05014.04
5.3.30.0100.04714.08
5.3.20.0070.04713.72
5.3.10.0030.04713.65
5.3.00.0070.07013.61
5.2.170.0100.05710.98
5.2.160.0130.03011.14
5.2.150.0000.04711.13
5.2.140.0030.04311.13
5.2.130.0100.05311.18
5.2.120.0030.04011.19
5.2.110.0070.06011.11
5.2.100.0070.04711.29
5.2.90.0070.03711.29
5.2.80.0070.05311.18
5.2.70.0000.04711.19
5.2.60.0200.05011.05
5.2.50.0030.05011.12
5.2.40.0130.03711.18
5.2.30.0130.05011.14
5.2.20.0070.03711.07
5.2.10.0000.04010.86
5.2.00.0070.03710.72
5.1.60.0130.0339.96
5.1.50.0030.03310.05
5.1.40.0000.0379.98
5.1.30.0100.03010.32
5.1.20.0070.03710.43
5.1.10.0070.03710.14
5.1.00.0070.04010.17
5.0.50.0000.0308.79
5.0.40.0100.0208.51
5.0.30.0000.0438.18
5.0.20.0000.0408.25
5.0.10.0100.0208.14
5.0.00.0070.0408.23
4.4.90.0000.0237.62
4.4.80.0100.0277.62
4.4.70.0030.0207.62
4.4.60.0030.0207.62
4.4.50.0030.0207.62
4.4.40.0030.0337.62
4.4.30.0030.0207.62
4.4.20.0030.0207.62
4.4.10.0000.0237.62
4.4.00.0000.0377.62
4.3.110.0000.0237.62
4.3.100.0070.0237.62
4.3.90.0000.0207.62
4.3.80.0000.0337.62
4.3.70.0030.0207.62
4.3.60.0000.0207.62
4.3.50.0070.0177.62
4.3.40.0000.0337.62
4.3.30.0000.0237.62
4.3.20.0030.0177.62
4.3.10.0100.0107.62
4.3.00.0100.0237.96

preferences:
51.82 ms | 401 KiB | 5 Q