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) { $i++; foreach ($bla as $b) { echo "($a, $b)<br />"; } if ($i > 5) 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.0140.00718.68
8.3.50.0050.01221.33
8.3.40.0090.00618.96
8.3.30.0070.00720.36
8.3.20.0040.00420.29
8.3.10.0060.00322.15
8.3.00.0070.00022.32
8.2.180.0060.00916.50
8.2.170.0090.00922.96
8.2.160.0090.00620.16
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00019.78
8.2.110.0090.00022.08
8.2.100.0070.00319.25
8.2.90.0040.00419.11
8.2.80.0060.00319.20
8.2.70.0040.00417.63
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00417.97
8.2.30.0000.00717.94
8.2.20.0040.00417.73
8.2.10.0000.00817.71
8.2.00.0040.00417.71
8.1.280.0070.00725.92
8.1.270.0110.00720.31
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0090.00023.79
8.1.230.0060.00719.00
8.1.220.0080.00017.74
8.1.210.0090.00018.77
8.1.200.0070.00317.13
8.1.190.0040.00417.63
8.1.180.0000.00818.70
8.1.170.0050.00318.65
8.1.160.0000.00722.05
8.1.150.0070.00018.64
8.1.140.0040.00417.46
8.1.130.0000.00717.77
8.1.120.0030.00317.51
8.1.110.0070.00017.35
8.1.100.0040.00417.38
8.1.90.0000.00717.47
8.1.80.0030.00617.36
8.1.70.0030.00317.43
8.1.60.0040.00417.52
8.1.50.0030.00617.57
8.1.40.0040.00417.56
8.1.30.0040.00417.59
8.1.20.0000.00817.62
8.1.10.0000.00717.56
8.1.00.0000.00817.49
8.0.300.0040.00418.77
8.0.290.0030.00317.17
8.0.280.0030.00318.34
8.0.270.0000.00717.20
8.0.260.0030.00316.88
8.0.250.0020.00517.05
8.0.240.0080.00016.93
8.0.230.0070.00017.04
8.0.220.0030.00516.88
8.0.210.0070.00016.90
8.0.200.0030.00317.01
8.0.190.0050.00316.99
8.0.180.0070.00017.00
8.0.170.0030.00617.02
8.0.160.0040.00416.85
8.0.150.0000.00716.92
8.0.140.0000.00716.91
8.0.130.0070.00013.43
8.0.120.0030.00616.91
8.0.110.0040.00416.96
8.0.100.0020.00516.84
8.0.90.0000.00716.77
8.0.80.0110.00416.95
8.0.70.0030.00517.02
8.0.60.0080.00016.86
8.0.50.0000.00717.00
8.0.30.0050.01517.14
8.0.20.0120.00917.40
8.0.10.0040.00416.95
8.0.00.0120.00816.91
7.4.330.0030.00315.00
7.4.320.0020.00516.53
7.4.300.0030.00316.45
7.4.290.0040.00416.48
7.4.280.0000.00816.27
7.4.270.0030.00616.50
7.4.260.0040.00716.38
7.4.250.0030.00616.34
7.4.240.0020.00616.46
7.4.230.0000.00716.50
7.4.220.0150.00816.58
7.4.210.0040.01716.45
7.4.200.0000.00816.32
7.4.190.0000.00816.61
7.4.160.0450.01916.46
7.4.150.0140.01717.40
7.4.140.0300.01517.86
7.4.130.0160.01716.43
7.4.120.0130.01416.40
7.4.110.0370.01516.61
7.4.100.0300.01116.29
7.4.90.0150.01016.44
7.4.80.0540.01319.39
7.4.70.0230.00616.57
7.4.60.0430.01216.60
7.4.50.0070.00016.28
7.4.40.0000.02222.77
7.4.30.0230.00816.51
7.4.00.0030.01214.52
7.3.330.0020.00513.41
7.3.320.0060.00013.18
7.3.310.0000.00816.30
7.3.300.0000.00816.34
7.3.290.0030.02016.30
7.3.280.0090.01016.31
7.3.270.0530.00917.40
7.3.260.0360.01316.46
7.3.250.0180.01016.29
7.3.240.0180.01016.21
7.3.230.0150.01516.57
7.3.210.0340.01116.37
7.3.200.0180.01219.39
7.3.190.0190.00316.54
7.3.180.0240.02116.24
7.3.170.0290.01816.30
7.3.160.0320.01916.42
7.3.120.0150.00615.04
7.2.330.0120.01216.75
7.2.320.0250.00416.65
7.2.310.1000.02116.60
7.2.300.0140.01116.76
7.2.290.0780.02416.70
7.2.60.0040.01216.98
7.2.00.0030.01019.25
7.1.200.0060.00915.88
7.1.100.0040.01218.04
7.1.70.0030.00617.11
7.1.60.0070.02019.40
7.1.50.0070.02217.11
7.0.200.0040.00416.61

preferences:
34.97 ms | 401 KiB | 5 Q