3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shiterator implements Iterator, SeekableIterator { private $_array = array(); private $position; public function __construct(array $array) { $this->_array = $array; } public function seek($position) { if (!isset($this->_array[$position])) { throw new OutOfBoundsException("invalid seek position ($position)"); } $this->position = $position; } public function rewind() { $this->position = 0; } public function current() { return $this->array[$this->position]; } public function key() { return $this->position; } public function next() { ++$this->position; } public function valid() { return isset($this->array[$this->position]); } } $stdcls = new stdClass(); $stdcls->message = 'PHP, still a peice of shit.'; $i = new Shiterator(array($stdcls)); foreach ($i as $t) { echo $stdcls->message; $stdcls->message = 'Zend still produces garbage.'; } var_dump($i);

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.40.0070.01418.79
8.3.30.0120.00319.04
8.3.20.0040.00420.24
8.3.10.0000.00823.66
8.3.00.0080.00317.63
8.2.170.0150.00622.96
8.2.160.0140.00320.34
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.14
8.2.110.0040.00422.29
8.2.100.0120.00019.78
8.2.90.0040.00419.41
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0080.00020.02
8.2.30.0050.00518.13
8.2.20.0040.00417.66
8.2.10.0000.00718.01
8.2.00.0050.00217.81
8.1.270.0060.00323.78
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00623.97
8.1.230.0040.00719.10
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0090.00017.35
8.1.190.0080.00017.23
8.1.180.0000.00918.10
8.1.170.0030.00518.68
8.1.160.0000.00821.93
8.1.150.0080.00018.68
8.1.140.0060.00317.49
8.1.130.0030.00317.86
8.1.120.0050.00217.49
8.1.110.0040.00417.39
8.1.100.0000.00717.42
8.1.90.0040.00417.44
8.1.80.0000.00817.52
8.1.70.0040.00417.48
8.1.60.0000.00917.58
8.1.50.0000.00817.43
8.1.40.0000.00817.43
8.1.30.0030.00517.51
8.1.20.0000.00817.55
8.1.10.0000.00917.60
8.1.00.0000.00817.42
8.0.300.0000.00718.77
8.0.290.0070.00017.18
8.0.280.0030.00318.45
8.0.270.0030.00317.14
8.0.260.0030.00617.26
8.0.250.0000.00817.00
8.0.240.0040.00416.88
8.0.230.0040.00416.86
8.0.220.0030.00316.92
8.0.210.0040.00416.80
8.0.200.0000.00716.96
8.0.190.0080.00017.00
8.0.180.0040.00416.94
8.0.170.0000.00816.94
8.0.160.0040.00416.89
8.0.150.0040.00416.86
8.0.140.0060.00416.87
8.0.130.0030.00313.39
8.0.120.0030.00616.88
8.0.110.0050.00316.91
8.0.100.0040.00416.97
8.0.90.0070.00016.80
8.0.80.0120.00316.89
8.0.70.0040.00416.78
8.0.60.0040.00417.02
8.0.50.0000.00716.73
8.0.30.0090.00917.00
8.0.20.0110.00717.40
8.0.10.0000.00816.97
8.0.00.0150.00516.89
7.4.330.0060.00015.09
7.4.320.0000.00616.45
7.4.300.0000.00616.59
7.4.290.0020.00516.61
7.4.280.0000.00716.61
7.4.270.0050.00316.51
7.4.260.0000.00716.42
7.4.250.0030.00716.49
7.4.240.0000.00716.57
7.4.230.0000.00716.52
7.4.220.0060.01216.70
7.4.210.0090.00916.59
7.4.200.0040.00416.49
7.4.190.0070.00016.48
7.4.160.0060.01116.24
7.4.150.0100.00717.40
7.4.140.0070.01017.86
7.4.130.0100.01116.60
7.4.120.0120.00916.49
7.4.110.0060.01116.64
7.4.100.0120.01116.39
7.4.90.0040.01516.49
7.4.80.0120.00919.39
7.4.70.0090.01316.49
7.4.60.0120.00416.61
7.4.50.0050.00016.65
7.4.40.0030.01316.50
7.4.30.0140.00316.49
7.4.00.0090.00714.84
7.3.330.0000.00513.29
7.3.320.0000.00613.27
7.3.310.0070.00016.31
7.3.300.0030.00316.27
7.3.290.0180.00316.27
7.3.280.0070.01316.31
7.3.270.0130.00517.40
7.3.260.0060.01016.38
7.3.250.0120.00816.39
7.3.240.0060.01116.38
7.3.230.0120.00316.39
7.3.210.0140.00316.49
7.3.200.0090.01219.39
7.3.190.0060.01616.50
7.3.180.0170.01016.63
7.3.170.0060.01016.58
7.3.160.0030.01216.33
7.3.120.0090.00414.87
7.3.110.0070.01014.85
7.3.100.0000.01614.81
7.3.90.0060.00914.61
7.3.80.0060.00914.78
7.3.70.0080.00814.67
7.3.60.0070.00714.82
7.3.50.0000.01214.72
7.3.40.0070.00714.93
7.3.30.0070.00714.97
7.3.20.0060.00916.76
7.3.10.0050.00516.83
7.3.00.0100.00516.67
7.2.330.0130.00416.78
7.2.320.0100.01016.45
7.2.310.0060.01216.82
7.2.300.0160.00016.70
7.2.290.0130.01016.48
7.2.250.0060.01215.28
7.2.240.0080.01115.30
7.2.230.0030.01315.14
7.2.220.0120.00415.20
7.2.210.0030.01315.02
7.2.200.0100.00314.98
7.2.190.0070.00715.24
7.2.180.0070.01015.29
7.2.170.0000.01115.24
7.2.130.0030.01217.04
7.2.120.0110.00616.96
7.2.110.0090.00616.83
7.2.100.0000.01816.93
7.2.90.0060.00616.73
7.2.80.0070.01016.92
7.2.70.0000.01217.16
7.2.60.0040.01117.13
7.2.50.0030.00917.09
7.2.40.0100.00616.96
7.2.30.0070.00716.80
7.2.20.0070.00716.90
7.2.10.0070.00316.82
7.2.00.0010.01118.12
7.1.330.0030.01315.64
7.1.320.0040.00415.87
7.1.310.0000.01115.59
7.1.300.0130.00015.73
7.1.290.0070.01015.80
7.1.280.0040.01116.01
7.1.270.0070.00715.54
7.1.260.0030.00715.83
7.1.250.0100.00315.69
7.1.240.0040.00815.55
7.1.230.0000.01015.88
7.1.220.0000.01115.70
7.1.210.0060.00315.87
7.1.200.0000.01515.91
7.1.190.0070.01015.78
7.1.180.0050.00515.72
7.1.170.0060.00915.70
7.1.160.0100.00315.84
7.1.150.0070.00715.81
7.1.140.0130.00315.83
7.1.130.0060.00915.75
7.1.120.0040.01115.89
7.1.110.0060.00315.71
7.1.100.0040.00716.94
7.1.90.0070.00715.71
7.1.80.0090.00015.83
7.1.70.0060.00416.58
7.1.60.0120.00817.57
7.1.50.0050.01216.41
7.1.40.0040.00815.73
7.1.30.0030.00815.54
7.1.20.0060.00615.63
7.1.10.0110.00415.47
7.1.00.0030.04318.92
7.0.330.0040.01115.24
7.0.320.0030.00915.14
7.0.310.0060.00615.30
7.0.300.0070.00415.60
7.0.290.0000.01015.46
7.0.280.0110.00315.48
7.0.270.0060.00615.19
7.0.260.0040.01115.58
7.0.250.0090.00315.57
7.0.240.0070.00415.16
7.0.230.0040.00815.48
7.0.220.0030.01315.56
7.0.210.0000.01415.62
7.0.200.0050.00616.15
7.0.190.0060.00615.58
7.0.180.0040.01115.24
7.0.170.0030.01115.26
7.0.160.0040.00815.42
7.0.150.0060.00315.38
7.0.140.0060.03918.75
7.0.130.0000.01515.53
7.0.120.0040.00715.43
7.0.110.0030.01015.44
7.0.100.0080.02717.75
7.0.90.0060.03117.66
7.0.80.0180.04417.54
7.0.70.0030.02517.71
7.0.60.0110.02317.64
7.0.50.0080.03217.77
7.0.40.0030.02816.72
7.0.30.0090.02316.74
7.0.20.0000.04216.80
7.0.10.0050.02716.79
7.0.00.0040.02516.63
5.6.380.0070.00414.34
5.6.370.0090.00614.68
5.6.360.0000.01014.34
5.6.350.0000.01314.62
5.6.340.0030.01414.68
5.6.330.0120.00314.25
5.6.320.0000.01714.33
5.6.310.0110.00414.08
5.6.300.0040.00814.17
5.6.290.0040.00714.32
5.6.280.0050.03917.63
5.6.270.0070.00714.54
5.6.260.0070.00714.24
5.6.250.0020.03217.60
5.6.240.0050.04317.61
5.6.230.0100.03717.57
5.6.220.0100.04117.56
5.6.210.0080.03517.48
5.6.200.0130.02517.79
5.6.190.0060.04417.70
5.6.180.0040.02417.56
5.6.170.0110.04117.82
5.6.160.0050.04317.57
5.6.150.0100.03817.76
5.6.140.0070.03817.68
5.6.130.0100.04217.72
5.6.120.0020.05317.73
5.6.110.0070.04417.66
5.6.100.0080.04317.69
5.6.90.0070.04417.77
5.6.80.0100.03817.33
5.6.70.0040.03117.21
5.6.60.0090.03817.46
5.6.50.0010.04017.32
5.6.40.0050.04317.18
5.6.30.0060.04517.32
5.6.20.0050.04317.38
5.6.10.0080.04017.34
5.6.00.0050.03817.38
5.5.380.0090.02515.80
5.5.370.0050.03415.89
5.5.360.0090.01715.98
5.5.350.0050.03915.82
5.5.340.0040.04116.18
5.5.330.0080.03716.12
5.5.320.0040.04416.01
5.5.310.0020.02516.07
5.5.300.0020.04316.07
5.5.290.0020.02616.16
5.5.280.0020.04415.99
5.5.270.0080.03616.04
5.5.260.0050.03316.03
5.5.250.0100.03515.90
5.5.240.0130.03015.72
5.5.230.0070.03815.75
5.5.220.0050.04515.73
5.5.210.0030.03515.74
5.5.200.0060.04115.67
5.5.190.0100.03315.68
5.5.180.0070.02515.65
5.5.170.0030.01011.21
5.5.160.0080.03715.66
5.5.150.0050.04315.68
5.5.140.0120.03515.77
5.5.130.0080.04115.76
5.5.120.0100.03715.73
5.5.110.0050.04415.65
5.5.100.0050.02815.64
5.5.90.0050.03815.58
5.5.80.0030.04515.60
5.5.70.0070.04015.66
5.5.60.0060.04315.68
5.5.50.0070.04115.56
5.5.40.0030.04715.59
5.5.30.0020.04615.61
5.5.20.0130.03715.72
5.5.10.0040.04415.57
5.5.00.0050.04015.59
5.4.450.0070.03315.31
5.4.440.0080.02215.29
5.4.430.0060.03915.32
5.4.420.0080.04315.35
5.4.410.0050.03215.25
5.4.400.0090.03915.18
5.4.390.0080.03515.01
5.4.380.0070.02715.15
5.4.370.0080.02515.19
5.4.360.0100.03615.10
5.4.350.0020.04115.17
5.4.340.0020.04215.10
5.4.330.0000.01011.18
5.4.320.0020.03715.10
5.4.310.0100.03715.20
5.4.300.0030.03915.02
5.4.290.0090.03115.01
5.4.280.0110.03715.15
5.4.270.0030.03815.04
5.4.260.0090.03015.10
5.4.250.0100.03515.11
5.4.240.0080.03515.16
5.4.230.0040.02215.02
5.4.220.0050.03815.11
5.4.210.0070.03315.22
5.4.200.0030.02615.13
5.4.190.0040.04215.06
5.4.180.0090.03315.15
5.4.170.0070.04015.16
5.4.160.0060.03515.09
5.4.150.0090.03215.21
5.4.140.0050.03813.79
5.4.130.0070.03313.79
5.4.120.0040.04013.83
5.4.110.0100.03713.83
5.4.100.0050.04013.83
5.4.90.0050.03813.76
5.4.80.0070.03713.74
5.4.70.0050.04113.72
5.4.60.0060.03813.75
5.4.50.0080.02013.74
5.4.40.0030.03813.82
5.4.30.0100.02813.85
5.4.20.0050.04513.76
5.4.10.0070.04013.73
5.4.00.0070.03713.53
5.3.290.0040.03512.93
5.3.280.0070.03212.93
5.3.270.0030.03812.90
5.3.260.0070.04212.86
5.3.250.0080.03812.90
5.3.240.0070.03812.93
5.3.230.0070.03212.94
5.3.220.0050.03712.85
5.3.210.0070.04012.91
5.3.200.0080.04212.85
5.3.190.0050.04212.85
5.3.180.0060.02412.88
5.3.170.0100.03312.94
5.3.160.0060.03912.91
5.3.150.0080.03512.92
5.3.140.0100.03312.94
5.3.130.0060.03812.91
5.3.120.0080.04012.91
5.3.110.0070.04212.82
5.3.100.0030.03812.68
5.3.90.0030.03312.61
5.3.80.0050.03112.61
5.3.70.0070.03312.60
5.3.60.0070.02012.59
5.3.50.0030.04212.63
5.3.40.0070.02912.63
5.3.30.0040.03812.59
5.3.20.0080.04012.46
5.3.10.0030.03012.47
5.3.00.0100.02312.38
5.2.170.0000.03312.15
5.2.160.0070.02312.15
5.2.150.0040.01612.15
5.2.140.0050.03112.15
5.2.130.0030.02712.15
5.2.120.0070.02312.15
5.2.110.0060.02612.15
5.2.100.0090.02912.15
5.2.90.0030.03012.15
5.2.80.0070.01812.15
5.2.70.0030.03112.15
5.2.60.0060.03312.15
5.2.50.0050.03212.15
5.2.40.0040.02712.15
5.2.30.0060.01812.15
5.2.20.0020.03312.15
5.2.10.0030.03312.15
5.2.00.0060.02312.15
5.1.60.0030.02412.15
5.1.50.0050.03112.15
5.1.40.0070.02212.15
5.1.30.0030.02612.15
5.1.20.0040.01712.15
5.1.10.0080.02212.15
5.1.00.0040.02712.15
5.0.50.0030.01812.15
5.0.40.0000.01512.15
5.0.30.0030.03012.15
5.0.20.0030.02212.15
5.0.10.0020.01412.15
5.0.00.0040.01712.15
4.4.90.0020.01212.15
4.4.80.0000.02012.15
4.4.70.0020.02212.15
4.4.60.0010.02012.15
4.4.50.0010.02012.15
4.4.40.0000.02712.15
4.4.30.0020.02012.15
4.4.20.0030.02012.15
4.4.10.0030.02012.15
4.4.00.0000.02512.15
4.3.110.0010.01612.15
4.3.100.0030.01812.15
4.3.90.0030.01212.15
4.3.80.0020.01612.15
4.3.70.0040.01812.15
4.3.60.0020.01912.15
4.3.50.0020.01912.15
4.3.40.0020.02312.15
4.3.30.0020.02012.15
4.3.20.0020.01512.15
4.3.10.0020.02212.15
4.3.00.0000.02312.15

preferences:
44.44 ms | 400 KiB | 5 Q