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()); foreach ($i as $t) { echo $t->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.70.0190.00616.88
8.3.60.0040.01116.63
8.3.50.0140.00721.97
8.3.40.0110.00418.76
8.3.30.0070.00719.21
8.3.20.0060.00320.13
8.3.10.0030.00623.47
8.3.00.0120.00017.38
8.2.180.0030.01416.63
8.2.170.0110.00422.96
8.2.160.0110.00320.44
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0040.00422.09
8.2.110.0030.00622.31
8.2.100.0090.00318.09
8.2.90.0000.01219.13
8.2.80.0000.00817.97
8.2.70.0030.00617.63
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0000.00819.55
8.2.30.0030.00618.16
8.2.20.0050.00317.64
8.2.10.0050.00218.06
8.2.00.0040.00417.74
8.1.280.0070.01025.92
8.1.270.0070.00023.93
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00324.02
8.1.230.0080.00319.00
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0060.00317.35
8.1.190.0040.00417.25
8.1.180.0030.00619.01
8.1.170.0040.00418.71
8.1.160.0070.00021.97
8.1.150.0040.00418.56
8.1.140.0040.00417.51
8.1.130.0030.00317.75
8.1.120.0040.00417.51
8.1.110.0070.00017.41
8.1.100.0000.00717.45
8.1.90.0070.00017.44
8.1.80.0070.00017.41
8.1.70.0050.00317.33
8.1.60.0040.00417.66
8.1.50.0040.00417.55
8.1.40.0050.00317.58
8.1.30.0000.00817.59
8.1.20.0040.00417.55
8.1.10.0060.00317.58
8.1.00.0080.00017.38
8.0.300.0040.00418.77
8.0.290.0050.00317.05
8.0.280.0070.00018.45
8.0.270.0030.00317.30
8.0.260.0040.00417.24
8.0.250.0040.00416.91
8.0.240.0000.00716.88
8.0.230.0070.00016.92
8.0.220.0040.00416.79
8.0.210.0050.00316.85
8.0.200.0000.00716.92
8.0.190.0060.00316.96
8.0.180.0000.00716.82
8.0.170.0030.00616.93
8.0.160.0000.00716.82
8.0.150.0040.00416.89
8.0.140.0030.00816.90
8.0.130.0000.00513.29
8.0.120.0000.00816.85
8.0.110.0040.00416.81
8.0.100.0000.00716.89
8.0.90.0040.00416.78
8.0.80.0030.01216.90
8.0.70.0000.00816.84
8.0.60.0000.00816.72
8.0.50.0000.00716.95
8.0.30.0090.01317.00
8.0.20.0120.00717.40
8.0.10.0000.00716.88
8.0.00.0080.01016.79
7.4.330.0020.00215.15
7.4.320.0000.00616.56
7.4.300.0030.00516.46
7.4.290.0000.00816.52
7.4.280.0030.00316.50
7.4.270.0040.00416.37
7.4.260.0070.00016.59
7.4.250.0030.00616.33
7.4.240.0030.00316.51
7.4.230.0000.00716.69
7.4.220.0060.01216.50
7.4.210.0100.00716.56
7.4.200.0000.00816.63
7.4.190.0080.00016.46
7.4.160.0060.01616.53
7.4.150.0110.00617.40
7.4.140.0130.00717.86
7.4.130.0100.01516.41
7.4.120.0070.01116.56
7.4.110.0110.00716.49
7.4.100.0070.01416.47
7.4.90.0170.00016.36
7.4.80.0130.00619.39
7.4.70.0030.01316.43
7.4.60.0110.00616.49
7.4.50.0000.00416.38
7.4.40.0100.00716.53
7.4.30.0030.01316.40
7.4.00.0070.01014.91
7.3.330.0050.00013.28
7.3.320.0000.00513.17
7.3.310.0000.00716.20
7.3.300.0070.00016.27
7.3.290.0170.00016.27
7.3.280.0110.00516.27
7.3.270.0100.00717.40
7.3.260.0140.01016.42
7.3.250.0060.01116.41
7.3.240.0030.01216.22
7.3.230.0100.00616.42
7.3.210.0070.01116.37
7.3.200.0140.00319.39
7.3.190.0170.00216.46
7.3.180.0060.01416.17
7.3.170.0090.00616.54
7.3.160.0140.00316.56
7.3.120.0060.00614.63
7.2.330.0140.00316.49
7.2.320.0080.01016.74
7.2.310.0130.00416.55
7.2.300.0060.01516.44
7.2.290.0170.00616.73
7.2.60.0250.00716.42
7.2.00.0000.01519.31
7.1.200.0140.00015.34
7.1.100.0070.00718.08
7.1.70.0110.00017.28
7.1.60.0080.00317.32
7.1.50.0040.01516.56
7.1.00.0100.07022.44
7.0.200.0070.00716.63
7.0.140.0100.06721.92
7.0.60.0200.06319.96
7.0.50.0100.07317.73
7.0.40.0200.07720.13
7.0.30.0630.05720.08
7.0.20.0200.03720.26
7.0.10.0370.06720.06
7.0.00.0030.07720.22
5.6.280.0100.08721.05
5.6.210.0000.08320.67
5.6.200.0030.08318.23
5.6.190.0000.04720.52
5.6.180.0170.05720.47
5.6.170.0230.04320.56
5.6.160.0070.03720.39
5.6.150.0100.08018.18
5.6.140.0100.08318.17
5.6.130.0030.04718.16
5.6.120.0000.04720.90
5.6.110.0070.04020.91
5.6.100.0130.07721.01
5.6.90.0030.08721.02
5.6.80.0070.05320.41
5.6.70.4300.04020.40
5.5.350.0070.08320.34
5.5.340.0100.07718.04
5.5.330.0100.07020.47
5.5.320.0300.08320.37
5.5.310.0170.05720.34
5.5.300.0200.03717.94
5.5.290.0100.07717.94
5.5.280.0070.03720.69
5.5.270.0100.04720.80
5.5.260.0100.04720.97
5.5.250.0000.05020.59
5.5.240.0070.04320.13
5.4.450.0170.05319.59
5.4.440.0170.05319.54
5.4.430.0230.05719.33
5.4.420.0100.06019.33
5.4.410.0100.06019.34
5.4.400.0070.07019.38
5.4.390.0130.05319.15
5.4.380.0100.06018.78
5.4.370.0130.05318.50
5.4.360.0130.05018.79
5.4.350.0200.06718.59
5.4.340.0200.06018.59
5.4.320.0050.03812.51
5.4.310.0050.04012.50
5.4.300.0070.04212.50
5.4.290.0040.04012.50
5.4.280.0080.03512.40
5.4.270.0040.04212.40
5.4.260.0080.03912.40
5.4.250.0070.04012.40
5.4.240.0080.04412.40
5.4.230.0040.04112.39
5.4.220.0090.03712.39
5.4.210.0090.03512.39
5.4.200.0080.03812.39
5.4.190.0080.03612.39
5.4.180.0080.04512.39
5.4.170.0090.04912.39
5.4.160.0080.04212.40
5.4.150.0100.04012.39
5.4.140.0100.04712.07
5.4.130.0110.03612.06
5.4.120.0080.03712.02
5.4.110.0070.04112.01
5.4.100.0070.03712.02
5.4.90.0080.03812.01
5.4.80.0070.03912.02
5.4.70.0070.03712.01
5.4.60.0100.03612.02
5.4.50.0070.03912.02
5.4.40.0060.04112.00
5.4.30.0100.05012.00
5.4.20.0090.05011.99
5.4.10.0090.05012.00
5.4.00.0070.04111.49
5.3.290.0080.04612.80
5.3.280.0060.04512.71
5.3.270.0080.04412.72
5.3.260.0080.04312.72
5.3.250.0110.04312.72
5.3.240.0070.05612.72
5.3.230.0120.03912.71
5.3.220.0100.04512.68
5.3.210.0090.03912.68
5.3.200.0060.04212.68
5.3.190.0090.03812.68
5.3.180.0090.05612.67
5.3.170.0100.05012.67
5.3.160.0080.03912.68
5.3.150.0090.04812.68
5.3.140.0110.07912.66
5.3.130.0140.09912.66
5.3.120.0130.04712.66
5.3.110.0240.08412.66
5.3.100.0040.04012.13
5.3.90.0100.04312.11
5.3.80.0090.04412.10
5.3.70.0120.05712.10
5.3.60.0060.05312.09
5.3.50.0070.05312.03
5.3.40.0060.05512.03
5.3.30.0100.05012.00
5.3.20.0190.05511.77
5.3.10.0050.03711.74
5.3.00.0090.04411.72
5.2.170.0030.0349.23
5.2.160.0030.0379.23
5.2.150.0070.0439.23
5.2.140.0050.0499.23
5.2.130.0070.0309.18
5.2.120.0090.0379.19
5.2.110.0050.0499.19
5.2.100.0020.0359.19
5.2.90.0050.0309.19
5.2.80.0090.0309.18
5.2.70.0080.0289.19
5.2.60.0060.0299.14
5.2.50.0040.0369.11
5.2.40.0100.0449.08
5.2.30.0060.0469.06
5.2.20.0050.0379.05
5.2.10.0080.0288.95
5.2.00.0050.0338.81
5.1.60.0050.0308.10
5.1.50.0070.0248.10
5.1.40.0030.0288.07
5.1.30.0040.0298.42
5.1.20.0060.0288.45
5.1.10.0050.0378.18
5.1.00.0060.0288.18
5.0.50.0040.0376.64
5.0.40.0130.0246.50
5.0.30.0070.0386.32
5.0.20.0030.0226.28
5.0.10.0050.0206.27
5.0.00.0070.0296.26
4.4.90.0090.0184.78
4.4.80.0040.0224.75
4.4.70.0030.0174.75
4.4.60.0040.0164.75
4.4.50.0040.0244.77
4.4.40.0050.0334.71
4.4.30.0030.0224.76
4.4.20.0050.0264.84
4.4.10.0040.0254.85
4.4.00.0070.0294.76
4.3.110.0020.0244.66
4.3.100.0050.0204.66
4.3.90.0050.0194.64
4.3.80.0050.0314.58
4.3.70.0070.0174.63
4.3.60.0050.0134.63
4.3.50.0050.0134.63
4.3.40.0030.0244.54
4.3.30.0020.0173.30
4.3.20.0030.0193.28
4.3.10.0010.0183.23
4.3.00.0030.0277.33

preferences:
32.73 ms | 401 KiB | 5 Q