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 > 30) 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.0070.00718.68
8.3.50.0070.01221.08
8.3.40.0080.00818.93
8.3.30.0060.00920.29
8.3.20.0050.00320.16
8.3.10.0070.00022.13
8.3.00.0040.00422.41
8.2.180.0040.01116.38
8.2.170.0070.00722.96
8.2.160.0090.00620.35
8.2.150.0050.00324.18
8.2.140.0060.00324.66
8.2.130.0040.01426.16
8.2.120.0050.00519.77
8.2.110.0080.00322.10
8.2.100.0000.01019.34
8.2.90.0000.00819.09
8.2.80.0030.00519.40
8.2.70.0030.00517.50
8.2.60.0000.00817.80
8.2.50.0080.00018.07
8.2.40.0030.00518.16
8.2.30.0040.00418.10
8.2.20.0050.00217.64
8.2.10.0000.00817.75
8.2.00.0020.00517.70
8.1.280.0140.00025.92
8.1.270.0100.01020.21
8.1.260.0000.00726.35
8.1.250.0000.00728.09
8.1.240.0040.00423.83
8.1.230.0000.01119.17
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0000.00917.48
8.1.190.0050.00317.63
8.1.180.0030.00618.82
8.1.170.0060.00318.61
8.1.160.0060.00322.10
8.1.150.0000.00718.64
8.1.140.0050.00217.45
8.1.130.0000.00717.83
8.1.120.0030.00517.49
8.1.110.0030.00517.32
8.1.100.0000.00717.38
8.1.90.0000.00817.49
8.1.80.0040.00417.41
8.1.70.0050.00317.43
8.1.60.0000.00817.48
8.1.50.0000.00817.50
8.1.40.0000.00817.41
8.1.30.0050.00217.53
8.1.20.0000.00817.63
8.1.10.0020.00517.58
8.1.00.0020.00517.36
8.0.300.0070.00018.77
8.0.290.0050.00317.16
8.0.280.0070.00018.34
8.0.270.0000.00717.17
8.0.260.0080.00016.79
8.0.250.0030.00317.01
8.0.240.0000.00816.98
8.0.230.0070.00017.04
8.0.220.0000.00717.01
8.0.210.0030.00316.86
8.0.200.0030.00317.00
8.0.190.0030.00616.91
8.0.180.0070.00016.97
8.0.170.0030.00516.96
8.0.160.0030.00416.99
8.0.150.0060.00316.77
8.0.140.0000.00716.86
8.0.130.0030.00313.38
8.0.120.0040.00416.81
8.0.110.0000.00816.83
8.0.100.0030.00516.76
8.0.90.0040.00416.99
8.0.80.0000.01516.89
8.0.70.0070.00016.85
8.0.60.0040.00416.83
8.0.50.0050.00217.01
8.0.30.0080.01217.11
8.0.20.0120.01117.40
8.0.10.0050.00216.91
8.0.00.0080.01016.95
7.4.330.0030.00315.00
7.4.320.0040.00416.41
7.4.300.0000.00716.36
7.4.290.0040.00416.49
7.4.280.0080.00016.48
7.4.270.0000.00816.31
7.4.260.0040.00416.45
7.4.250.0040.00716.34
7.4.240.0010.00716.47
7.4.230.0000.00816.49
7.4.220.0130.01016.35
7.4.210.0090.00916.45
7.4.200.0000.00716.58
7.4.190.0080.00016.54
7.4.160.0060.01616.33
7.4.150.0140.01117.40
7.4.140.0230.01617.86
7.4.130.0220.01416.44
7.4.120.0150.01616.40
7.4.110.1000.02616.62
7.4.100.0190.00616.25
7.4.90.0810.01616.45
7.4.80.0140.02619.39
7.4.70.0050.02016.38
7.4.60.0120.00916.55
7.4.50.0030.00316.50
7.4.40.0080.01122.77
7.4.30.0030.02216.22
7.3.330.0050.00213.41
7.3.320.0060.00013.45
7.3.310.0080.00016.34
7.3.300.0080.00016.34
7.3.290.0130.00316.31
7.3.280.0090.01416.27
7.3.270.0430.00617.40
7.3.260.0340.00816.49
7.3.250.0150.01316.35
7.3.240.0320.01416.29
7.3.230.0300.01516.39
7.3.210.0270.01316.46
7.3.200.0070.01119.39
7.3.190.1650.01616.63
7.3.180.0060.01816.27
7.3.170.0190.00616.47
7.3.160.0700.02616.38
7.2.330.0350.01016.75
7.2.320.0120.01516.79
7.2.310.0470.02616.71
7.2.300.0200.01216.77
7.2.290.0320.02416.68
7.2.90.2160.00714.27
7.2.80.0180.00314.52
7.2.70.2110.01015.12
7.2.60.2780.00714.55
7.2.50.0760.01014.83
7.2.40.2410.00714.60
7.2.30.0780.00014.77
7.2.20.1990.00614.98
7.2.10.0190.00715.09
7.2.00.0130.01814.93
7.1.210.2150.01013.95
7.1.200.2200.01013.71
7.1.190.2460.00913.93
7.1.180.2300.01313.76
7.1.170.1850.01313.73
7.1.160.0070.02013.65
7.1.150.0110.00813.79
7.1.140.0880.00313.80
7.1.130.1850.00013.74
7.1.120.0480.00913.79
7.1.110.0130.01313.87
7.1.100.0400.01613.97
7.1.90.0400.01313.83
7.1.80.0180.00513.94
7.1.70.0120.01113.62
7.1.60.1740.00931.88
7.1.50.0520.01532.00
7.1.40.0600.00931.73
7.1.30.0540.01132.02
7.1.20.0330.01432.06
7.1.10.0220.00813.98
7.1.00.0140.00313.64
7.0.310.0130.01313.27
7.0.300.0160.01613.41
7.0.290.1640.01613.39
7.0.280.0460.01313.55
7.0.270.0240.00713.54
7.0.260.0120.00813.41
7.0.250.1250.01013.61
7.0.240.0100.01613.52
7.0.230.1730.00613.42
7.0.220.0120.00613.55
7.0.210.0180.00413.20
7.0.200.0120.01213.51
7.0.190.0230.00813.20
7.0.180.0520.00013.49
7.0.170.0520.00713.55
7.0.160.0120.01213.72
7.0.150.0170.00913.49
7.0.140.0110.00713.40
7.0.130.0310.01013.54
7.0.120.0120.01113.30
7.0.110.0180.00413.41
7.0.100.0930.01413.61
7.0.90.1200.01013.47
7.0.80.0560.00313.61
7.0.70.0440.01213.71
7.0.60.0160.00613.80
7.0.50.0140.01413.59
7.0.40.0920.01013.89
7.0.30.0200.01013.53
7.0.20.0530.00313.56
7.0.10.0200.00513.80
7.0.00.0160.01113.52
5.6.300.0060.02114.33
5.6.290.0160.00514.36
5.6.280.0130.01514.49
5.6.270.0130.00514.60
5.6.260.0260.00714.59
5.6.250.0000.02114.30
5.6.240.0180.00914.37
5.6.230.0130.00614.62
5.6.220.0190.00714.21
5.6.210.0220.00014.45
5.6.200.0210.00314.44
5.6.190.0060.01214.57
5.6.180.0150.01014.52
5.6.170.0030.02414.26
5.6.160.0110.01314.39
5.6.150.0320.00014.27
5.6.140.0120.00914.36
5.6.130.0120.00714.52
5.6.120.0120.01014.15
5.6.110.0120.00814.39
5.6.100.0170.00814.30
5.6.90.0060.01214.54
5.6.80.0100.01414.37
5.6.70.0200.00014.47
5.5.380.0080.00811.50
5.5.370.0090.00911.23
5.5.360.0160.00611.36
5.5.350.0150.00011.22
5.5.340.0100.01011.38
5.5.330.0090.00511.33
5.5.320.0090.00511.33
5.5.310.0160.00611.27
5.5.300.0110.00711.32
5.5.290.0070.00711.42
5.5.280.0150.00311.12
5.5.270.0120.00611.04
5.5.260.0110.01311.18
5.5.250.0070.00711.28
5.5.240.0090.00911.24
5.5.230.0120.00711.24
5.4.450.0110.01111.29
5.4.440.0100.00710.80
5.4.430.0130.00711.05
5.4.420.0040.01511.16
5.4.410.0120.00411.09
5.4.400.0120.00411.09
5.4.390.0060.01211.20

preferences:
37 ms | 401 KiB | 5 Q