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:"; $bla = new Bla(); $i = 0; foreach($bla as $a) { foreach ($bla as $b) { echo "($a, $b)<br />"; $i++; } if ($i > 20) break; }

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.0100.00718.30
8.3.50.0100.00521.14
8.3.40.0100.01018.97
8.3.30.0070.00720.35
8.3.20.0000.00820.48
8.3.10.0040.00421.98
8.3.00.0080.00022.40
8.2.180.0070.00716.63
8.2.170.0000.01522.96
8.2.160.0130.00020.31
8.2.150.0030.00524.18
8.2.140.0180.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00219.83
8.2.110.0090.00022.00
8.2.100.0110.00019.34
8.2.90.0000.00719.05
8.2.80.0050.00319.38
8.2.70.0000.00817.50
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0030.00618.09
8.2.30.0080.00018.02
8.2.20.0040.00417.59
8.2.10.0050.00317.81
8.2.00.0040.00417.71
8.1.280.0120.00925.92
8.1.270.0030.00620.36
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00623.79
8.1.230.0080.00319.10
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0070.00317.48
8.1.190.0030.00617.52
8.1.180.0040.00418.73
8.1.170.0030.00618.59
8.1.160.0040.00422.21
8.1.150.0050.00318.62
8.1.140.0000.00717.44
8.1.130.0070.00017.77
8.1.120.0040.00417.48
8.1.110.0020.00517.45
8.1.100.0050.00317.50
8.1.90.0040.00417.37
8.1.80.0040.00317.52
8.1.70.0030.00317.43
8.1.60.0030.00617.56
8.1.50.0000.00817.46
8.1.40.0030.00717.55
8.1.30.0030.00517.58
8.1.20.0000.00817.61
8.1.10.0050.00317.57
8.1.00.0090.00017.45
8.0.300.0040.00418.77
8.0.290.0060.00317.15
8.0.280.0000.00718.46
8.0.270.0070.00017.21
8.0.260.0000.00716.77
8.0.250.0030.00316.87
8.0.240.0060.00317.01
8.0.230.0000.00717.04
8.0.220.0030.00316.99
8.0.210.0040.00416.85
8.0.200.0000.00817.04
8.0.190.0040.00317.06
8.0.180.0080.00016.95
8.0.170.0040.00417.00
8.0.160.0040.00416.89
8.0.150.0000.00716.81
8.0.140.0030.00516.91
8.0.130.0000.00613.36
8.0.120.0080.00016.95
8.0.110.0040.00416.98
8.0.100.0070.00017.00
8.0.90.0050.00316.89
8.0.80.0070.00816.97
8.0.70.0000.00716.78
8.0.60.0040.00417.03
8.0.50.0000.00716.94
8.0.30.0110.00817.11
8.0.20.0100.00817.47
8.0.10.0080.00016.96
8.0.00.0070.01416.87
7.4.330.0000.00615.00
7.4.320.0040.00416.41
7.4.300.0000.00816.37
7.4.290.0080.00016.29
7.4.280.0050.00316.46
7.4.270.0030.00716.40
7.4.260.0100.00616.38
7.4.250.0040.00416.30
7.4.240.0080.00016.44
7.4.230.0030.00616.45
7.4.220.0100.02216.57
7.4.210.0070.01216.47
7.4.200.0060.00316.23
7.4.190.0080.00016.61
7.4.160.0360.00916.66
7.4.150.0200.01617.40
7.4.140.0130.01117.86
7.4.130.0330.01216.54
7.4.120.0230.00916.40
7.4.110.0120.01316.48
7.4.100.0320.01916.49
7.4.90.0160.01216.45
7.4.80.0250.01619.39
7.4.70.0080.01416.53
7.4.60.0080.01316.58
7.4.50.0100.00016.37
7.4.40.0060.01222.77
7.4.30.0110.01116.20
7.4.00.0060.01014.77
7.3.330.0000.00713.42
7.3.320.0030.00313.43
7.3.310.0030.00616.30
7.3.300.0050.00316.21
7.3.290.0120.01316.27
7.3.280.0120.01016.32
7.3.270.0210.00517.40
7.3.260.0480.00716.63
7.3.250.0210.01516.30
7.3.240.0190.00916.27
7.3.230.1040.03116.41
7.3.210.0130.01016.43
7.3.200.0410.00319.39
7.3.190.0720.01316.33
7.3.180.0100.00916.36
7.3.170.0140.00816.29
7.3.160.0290.01416.52
7.3.120.0080.00814.52
7.2.330.0070.01416.69
7.2.320.0560.01716.43
7.2.310.0070.01916.58
7.2.300.0140.01416.70
7.2.290.0100.01216.41
7.2.60.0000.01616.75
7.1.200.0070.00715.73
7.1.100.0000.01217.91
7.1.70.0040.00817.04
7.1.60.0110.01419.40
7.1.50.0170.00717.16
7.1.00.0070.07022.36
7.0.200.0130.00614.82
7.0.140.0100.07021.99
7.0.60.0070.08020.08
7.0.50.0070.08017.79
7.0.40.0130.04019.71
7.0.30.0030.04319.95
7.0.20.0070.05319.84
7.0.10.0130.05019.84
7.0.00.0100.06719.88
5.6.280.0070.07321.03
5.6.210.0100.06320.67
5.6.200.0070.05318.14
5.6.190.0070.06020.36
5.6.180.0400.06720.23
5.6.170.0170.04720.36
5.6.160.0100.08720.33
5.6.150.0030.04018.14
5.6.140.0030.04018.24
5.6.130.0030.04718.16
5.6.120.0070.04721.00
5.6.110.0200.04020.99
5.6.100.0130.09020.98
5.6.90.0070.04320.98
5.6.80.0070.03720.41
5.5.350.0200.04020.48
5.5.340.0100.08318.00
5.5.330.0030.08320.18
5.5.320.0200.04320.20
5.5.310.0170.06720.86
5.5.300.0030.04317.80
5.5.290.0070.07717.99
5.5.280.0130.07720.77
5.5.270.0070.06720.93
5.5.260.0070.07320.76
5.5.250.0100.06720.55
5.5.240.0070.08020.36
5.4.450.0170.07019.35
5.4.440.0270.05719.14
5.4.430.0270.05019.54
5.4.420.0270.05019.31
5.4.410.0130.08019.26
5.4.400.0230.05019.20
5.4.390.0200.06019.00
5.4.380.0230.05019.13
5.4.370.0330.05719.10
5.4.360.0130.06719.18
5.4.350.0200.05319.10
5.4.340.0330.06718.78
5.4.320.0070.06719.14
5.4.310.0270.05018.77
5.4.300.0100.06318.81
5.4.290.0230.05319.08
5.4.280.0270.05319.03
5.4.270.0200.05019.07
5.4.260.0200.05018.93
5.4.250.0170.05719.23
5.4.240.0100.07319.29
5.4.230.0230.05718.92
5.4.220.0170.06319.23
5.4.210.0330.05019.19
5.4.200.0270.05019.21
5.4.190.0230.05019.07
5.4.180.0330.05019.18
5.4.170.0130.05719.18
5.4.160.0170.06019.06
5.4.150.0070.07018.76
5.4.140.0130.06716.33
5.4.130.0430.05316.36
5.4.120.0230.05316.50
5.4.110.0530.05016.50
5.4.100.0200.06016.46
5.4.90.0200.04316.50
5.4.80.0070.06316.33
5.4.70.0300.05016.26
5.4.60.0570.06716.43
5.4.50.0570.06016.38
5.4.40.0400.05716.58
5.4.30.0500.06016.58
5.4.20.0100.05716.60
5.4.10.0230.05316.38
5.4.00.0270.06315.95
5.3.290.0500.05014.53
5.3.280.0430.06314.49
5.3.270.0470.05014.38
5.3.260.0570.06014.37
5.3.250.0400.05714.35
5.3.240.0600.04314.45
5.3.230.0430.07714.32
5.3.220.0300.05714.29
5.3.210.0170.06314.33
5.3.200.0230.06014.39
5.3.190.0170.05714.49
5.3.180.0300.04314.63
5.3.170.0130.06714.49
5.3.160.0170.06714.34
5.3.150.0300.04014.39
5.3.140.0200.06714.27
5.3.130.0370.05714.47
5.3.120.0200.07014.29
5.3.110.0300.05014.42
5.3.100.0130.06313.89
5.3.90.0200.05313.86
5.3.80.0270.06013.87
5.3.70.0470.05313.88
5.3.60.0400.05313.85
5.3.50.0070.06313.63
5.3.40.0200.05313.81
5.3.30.0330.05313.76
5.3.20.0530.04313.55
5.3.10.0500.05013.30
5.3.00.0530.05313.64
5.2.170.0370.05310.84
5.2.160.0400.04010.91
5.2.150.0400.04010.93
5.2.140.0500.04310.78
5.2.130.0130.05010.85
5.2.120.0200.04710.87
5.2.110.0230.04710.93
5.2.100.0200.04710.94
5.2.90.0400.04310.86
5.2.80.0230.05310.91
5.2.70.0200.06010.76
5.2.60.0170.06710.76
5.2.50.0230.06010.88
5.2.40.0170.04310.82
5.2.30.0100.05710.73
5.2.20.0200.04710.86
5.2.10.0130.04310.73
5.2.00.0130.06310.55
5.1.60.0230.03710.27
5.1.50.0200.03310.27
5.1.40.0100.04710.27
5.1.30.0070.04710.27
5.1.20.0100.04710.27
5.1.10.0230.03710.27
5.1.00.0130.04010.27
5.0.50.0100.03310.27
5.0.40.0100.03310.27
5.0.30.0100.05310.27
5.0.20.0070.04310.27
5.0.10.0130.03010.27
5.0.00.0100.05710.27
4.4.90.0170.02310.27
4.4.80.0070.02310.27
4.4.70.0030.03310.27
4.4.60.0030.02710.27
4.4.50.0070.02010.27
4.4.40.0130.03010.27
4.4.30.0100.02010.27
4.4.20.0100.02310.27
4.4.10.0070.03010.27
4.4.00.0100.03710.27
4.3.110.0170.02710.27
4.3.100.0130.02010.27
4.3.90.0170.02010.27
4.3.80.0170.03310.27
4.3.70.0200.01710.27
4.3.60.0130.02710.27
4.3.50.0200.02310.27
4.3.40.0130.04310.27
4.3.30.0070.02710.27
4.3.20.0030.02710.27
4.3.10.0030.02710.27
4.3.00.0170.01010.27

preferences:
69.45 ms | 401 KiB | 5 Q