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 > 100) 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.0150.00618.55
8.3.50.0100.00521.14
8.3.40.0110.00418.83
8.3.30.0120.00320.21
8.3.20.0040.00420.20
8.3.10.0080.00022.11
8.3.00.0050.00322.52
8.2.180.0140.00716.88
8.2.170.0070.01422.96
8.2.160.0110.00320.57
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00419.54
8.2.110.0090.00022.11
8.2.100.0110.00019.38
8.2.90.0040.00419.27
8.2.80.0090.00019.40
8.2.70.0000.00817.50
8.2.60.0070.00218.03
8.2.50.0000.00818.07
8.2.40.0060.00318.22
8.2.30.0000.00718.07
8.2.20.0050.00317.68
8.2.10.0040.00417.87
8.2.00.0070.00017.70
8.1.280.0100.00725.92
8.1.270.0080.00020.34
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0060.00323.91
8.1.230.0030.00719.01
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0100.00017.36
8.1.190.0040.00417.63
8.1.180.0000.00820.52
8.1.170.0050.00318.66
8.1.160.0000.00822.05
8.1.150.0040.00418.68
8.1.140.0070.00017.45
8.1.130.0030.00317.83
8.1.120.0000.00717.36
8.1.110.0000.00717.44
8.1.100.0040.00417.34
8.1.90.0040.00417.48
8.1.80.0000.00717.39
8.1.70.0000.00817.35
8.1.60.0040.00417.64
8.1.50.0040.00417.55
8.1.40.0000.00717.51
8.1.30.0030.00517.64
8.1.20.0030.00617.56
8.1.10.0040.00417.61
8.1.00.0030.00517.47
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0000.00718.39
8.0.270.0030.00317.27
8.0.260.0000.00716.90
8.0.250.0040.00417.07
8.0.240.0030.00516.98
8.0.230.0050.00316.92
8.0.220.0070.00016.88
8.0.210.0030.00317.00
8.0.200.0030.00317.05
8.0.190.0030.00417.07
8.0.180.0040.00417.02
8.0.170.0040.00416.88
8.0.160.0040.00417.00
8.0.150.0040.00316.93
8.0.140.0040.00416.92
8.0.130.0060.00013.35
8.0.120.0050.00316.96
8.0.110.0000.00816.92
8.0.100.0030.00516.95
8.0.90.0050.00216.83
8.0.80.0110.00416.84
8.0.70.0000.00716.95
8.0.60.0030.00516.89
8.0.50.0000.00816.82
8.0.30.0100.00917.21
8.0.20.0080.01117.40
8.0.10.0050.00317.19
8.0.00.0100.01016.94
7.4.330.0030.00315.00
7.4.320.0040.00416.34
7.4.300.0040.00416.33
7.4.290.0000.00816.39
7.4.280.0050.00216.38
7.4.270.0080.00016.51
7.4.260.0040.00416.44
7.4.250.0030.00616.30
7.4.240.0040.00416.43
7.4.230.0090.00016.43
7.4.220.0030.01916.53
7.4.210.0130.00716.44
7.4.200.0000.00716.41
7.4.190.0060.00316.57
7.4.160.0160.01316.54
7.4.150.0610.01717.40
7.4.140.0210.01717.86
7.4.130.0240.01616.45
7.4.120.0240.00716.50
7.4.110.0280.01316.44
7.4.100.0190.00616.50
7.4.90.0160.00816.35
7.4.80.0370.02019.39
7.4.70.0160.01516.21
7.4.60.0420.01816.52
7.4.50.0070.00316.34
7.4.40.0080.01222.77
7.4.30.0320.02616.32
7.4.00.0040.01514.92
7.3.330.0000.00613.35
7.3.320.0000.00813.40
7.3.310.0030.00616.20
7.3.300.0040.00416.30
7.3.290.0150.01116.30
7.3.280.0100.01016.30
7.3.270.0070.01717.40
7.3.260.0140.00816.31
7.3.250.0320.01616.40
7.3.240.0190.01316.43
7.3.230.0160.00616.39
7.3.210.0280.00716.15
7.3.200.0820.02419.39
7.3.190.0120.01216.39
7.3.180.0080.01216.31
7.3.170.0190.02116.32
7.3.160.0140.01116.38
7.3.120.0110.00714.90
7.2.330.0150.00916.41
7.2.320.0180.01416.76
7.2.310.0040.01816.59
7.2.300.0240.00616.72
7.2.290.0780.03716.47
7.2.60.0040.00917.02
7.2.00.0030.00719.66
7.1.200.0070.00715.50
7.1.100.0030.01018.14
7.1.70.0000.01016.95
7.1.60.0100.01019.29
7.1.50.0070.01416.95
7.0.200.0300.00814.30

preferences:
40.01 ms | 401 KiB | 5 Q