3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shiterator implements Iterator { private $_array = array(); public function __construct(array $array) { $this->_array = $array; } public function rewind() { reset($this->_array); } public function current() { return current($this->_array); } public function key() { return key($this->_array); } public function next() { next($this->_array); } public function valid() { return $this->key() !== null; } } $stdcls = new stdClass(); $stdcls->message = 'PHP, still a peice of shit.'; $i = new Shiterator(array($stdcls)); foreach ($i as $t) { echo $stdcls->message; }

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.01016.86
8.3.50.0080.01122.16
8.3.40.0180.00018.65
8.3.30.0070.00719.27
8.3.20.0040.00420.04
8.3.10.0120.00323.66
8.3.00.0040.00817.75
8.2.180.0110.00716.50
8.2.170.0110.00422.96
8.2.160.0070.01020.51
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0070.00022.27
8.2.110.0040.00422.29
8.2.100.0040.00819.95
8.2.90.0000.00819.25
8.2.80.0000.00817.97
8.2.70.0030.00617.50
8.2.60.0080.00017.93
8.2.50.0080.00018.07
8.2.40.0050.00319.68
8.2.30.0110.00018.08
8.2.20.0040.00417.68
8.2.10.0080.00018.16
8.2.00.0000.00717.61
8.1.280.0180.00025.92
8.1.270.0040.00423.91
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00023.87
8.1.230.0080.00419.15
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0040.00417.25
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0000.00721.95
8.1.150.0020.00518.70
8.1.140.0070.00017.36
8.1.130.0030.00317.74
8.1.120.0030.00417.55
8.1.110.0040.00417.43
8.1.100.0000.00817.46
8.1.90.0000.00717.46
8.1.80.0020.00517.45
8.1.70.0000.00717.38
8.1.60.0060.00317.64
8.1.50.0030.00517.40
8.1.40.0000.00717.54
8.1.30.0080.00017.50
8.1.20.0020.00517.52
8.1.10.0040.00417.54
8.1.00.0040.00417.54
8.0.300.0070.00018.77
8.0.290.0050.00217.18
8.0.280.0030.00318.39
8.0.270.0070.00017.27
8.0.260.0040.00417.23
8.0.250.0030.00416.95
8.0.240.0040.00416.85
8.0.230.0030.00316.97
8.0.220.0070.00016.89
8.0.210.0030.00316.93
8.0.200.0030.00316.95
8.0.190.0080.00016.89
8.0.180.0040.00416.93
8.0.170.0040.00416.95
8.0.160.0050.00316.77
8.0.150.0040.00316.79
8.0.140.0030.00716.88
8.0.130.0050.00013.30
8.0.120.0070.00316.79
8.0.110.0070.00016.92
8.0.100.0040.00416.79
8.0.90.0000.00816.79
8.0.80.0100.00716.94
8.0.70.0040.00416.93
8.0.60.0040.00417.01
8.0.50.0000.00816.80
8.0.30.0110.00817.01
8.0.20.0120.00817.40
8.0.10.0040.00416.97
8.0.00.0110.01016.62
7.4.330.0050.00015.13
7.4.320.0040.00416.44
7.4.300.0000.00716.52
7.4.290.0030.00516.52
7.4.280.0000.00716.61
7.4.270.0040.00416.55
7.4.260.0040.00416.60
7.4.250.0030.00516.48
7.4.240.0000.00716.61
7.4.230.0000.00716.54
7.4.220.0070.01016.55
7.4.210.0070.01116.51
7.4.200.0030.00316.40
7.4.190.0030.00516.77
7.4.160.0060.00916.51
7.4.150.0110.01417.40
7.4.140.0110.00817.86
7.4.130.0090.00816.63
7.4.120.0070.01316.62
7.4.110.0070.01016.63
7.4.100.0110.00916.63
7.4.90.0070.01016.41
7.4.80.0070.01019.39
7.4.70.0060.00916.56
7.4.60.0060.01516.45
7.4.50.0040.00416.31
7.4.40.0130.00316.53
7.4.30.0030.01316.63
7.4.00.0070.00714.84
7.3.330.0000.00613.17
7.3.320.0030.00313.30
7.3.310.0040.00416.36
7.3.300.0030.00316.27
7.3.290.0100.00716.23
7.3.280.0100.01016.33
7.3.270.0110.00617.40
7.3.260.0100.00716.38
7.3.250.0090.00916.45
7.3.240.0070.00816.54
7.3.230.0140.00316.39
7.3.210.0060.01116.39
7.3.200.0070.01319.39
7.3.190.0200.00816.27
7.3.180.0060.01216.31
7.3.170.0060.00916.48
7.3.160.0120.00416.38
7.3.120.0030.01015.02
7.2.330.0110.00716.40
7.2.320.0140.00616.86
7.2.310.0080.00816.58
7.2.300.0100.00716.77
7.2.290.0110.01416.64
7.2.00.0030.00919.60
7.1.100.0060.00918.16
7.1.70.0040.01117.25
7.1.60.0070.01819.46
7.1.50.0070.01717.06
7.1.00.0030.07722.40
7.0.200.0000.00816.59
7.0.140.0000.07722.05
7.0.60.0070.04320.02
7.0.50.0070.08017.88
7.0.40.0100.05020.05
7.0.30.0230.04320.23
7.0.20.0330.07320.12
7.0.10.0130.08020.20
7.0.00.0170.08020.30
5.6.280.0100.06721.10
5.6.210.0230.07020.46
5.6.200.0000.05018.19
5.6.190.0030.08020.39
5.6.180.0130.08720.60
5.6.170.0270.03720.50
5.6.160.0100.04720.61
5.6.150.0070.08318.24
5.6.140.0100.07318.15
5.6.130.0030.06018.12
5.6.120.0170.08020.97
5.6.110.0100.05320.99
5.6.100.0130.07321.13
5.6.90.0130.07721.11
5.6.80.0030.08320.36
5.5.350.4270.04320.36
5.5.340.0100.05318.05
5.5.330.0030.04020.40
5.5.320.0200.04020.32
5.5.310.0270.05720.19
5.5.300.0100.07718.04
5.5.290.0070.07317.95
5.5.280.0070.06720.89
5.5.270.0000.07720.96
5.5.260.0030.08720.84
5.5.250.0070.05320.69
5.5.240.0070.07320.24
5.4.450.0400.04719.71
5.4.440.0330.04719.47
5.4.430.0200.05719.58
5.4.420.0230.06019.45
5.4.410.0200.05319.36
5.4.400.0100.06719.01
5.4.390.0300.06318.98
5.4.380.0300.04718.81
5.4.370.0200.04318.70
5.4.360.0100.05018.71
5.4.350.0170.06018.73
5.4.340.0170.04718.73
5.4.320.0060.03712.50
5.4.310.0110.05312.50
5.4.300.0100.04512.50
5.4.290.0080.04112.50
5.4.280.0090.03312.40
5.4.270.0070.03812.39
5.4.260.0090.04112.40
5.4.250.0080.05312.40
5.4.240.0080.04112.39
5.4.230.0030.04212.39
5.4.220.0050.03812.39
5.4.210.0050.03712.39
5.4.200.0020.04312.39
5.4.190.0040.04412.39
5.4.180.0040.04112.39
5.4.170.0050.03812.40
5.4.160.0080.03912.39
5.4.150.0060.05212.39
5.4.140.0040.04012.08
5.4.130.0070.05012.07
5.4.120.0060.04012.02
5.4.110.0110.03212.02
5.4.100.0040.03912.01
5.4.90.0120.04912.02
5.4.80.0080.05112.02
5.4.70.0110.02912.01
5.4.60.0050.03712.02
5.4.50.0040.03912.02
5.4.40.0090.03312.00
5.4.30.0070.04512.00
5.4.20.0060.04112.00
5.4.10.0080.04912.00
5.4.00.0110.04911.49
5.3.290.0080.04712.80
5.3.280.0060.04212.71
5.3.270.0060.03912.72
5.3.260.0090.03912.71
5.3.250.0080.03512.72
5.3.240.0060.03912.72
5.3.230.0050.03912.70
5.3.220.0120.03212.68
5.3.210.0060.04212.68
5.3.200.0090.05012.68
5.3.190.0040.04012.68
5.3.180.0070.03512.68
5.3.170.0080.03612.67
5.3.160.0070.03612.67
5.3.150.0090.03712.67
5.3.140.0060.03812.66
5.3.130.0090.03812.66
5.3.120.0050.04112.66
5.3.110.0060.04112.66
5.3.100.0070.03812.13
5.3.90.0070.03812.11
5.3.80.0060.03712.10
5.3.70.0100.03412.10
5.3.60.0060.03712.09
5.3.50.0090.04112.03
5.3.40.0020.04112.03
5.3.30.0040.03712.00
5.3.20.0100.03011.77
5.3.10.0050.03511.74
5.3.00.0110.03111.72
5.2.170.0050.0309.23
5.2.160.0050.0299.23
5.2.150.0080.0289.23
5.2.140.0050.0309.22
5.2.130.0080.0279.18
5.2.120.0040.0309.19
5.2.110.0050.0299.19
5.2.100.0060.0309.19
5.2.90.0080.0279.19
5.2.80.0050.0349.18
5.2.70.0100.0379.19
5.2.60.0060.0379.14
5.2.50.0050.0349.11
5.2.40.0070.0309.08
5.2.30.0070.0299.06
5.2.20.0070.0279.05
5.2.10.0080.0268.95
5.2.00.0040.0328.81
5.1.60.0060.0268.10
5.1.50.0040.0278.10
5.1.40.0050.0278.07
5.1.30.0060.0278.42
5.1.20.0050.0388.45
5.1.10.0050.0358.18
5.1.00.0090.0268.17
5.0.50.0050.0206.64
5.0.40.0050.0186.50
5.0.30.0030.0326.32
5.0.20.0040.0226.28
5.0.10.0060.0286.26
5.0.00.0030.0406.26
4.4.90.0020.0184.78
4.4.80.0050.0144.75
4.4.70.0050.0154.76
4.4.60.0010.0244.76
4.4.50.0050.0204.77
4.4.40.0030.0324.71
4.4.30.0050.0174.75
4.4.20.0070.0164.84
4.4.10.0040.0154.85
4.4.00.0020.0274.76
4.3.110.0010.0174.67
4.3.100.0010.0174.67
4.3.90.0030.0144.63
4.3.80.0030.0244.59
4.3.70.0020.0164.63
4.3.60.0020.0194.62
4.3.50.0020.0204.63
4.3.40.0010.0264.54
4.3.30.0030.0163.30
4.3.20.0010.0203.28
4.3.10.0040.0213.23
4.3.00.0100.0207.33

preferences:
43.12 ms | 401 KiB | 5 Q