3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface A extends Traversable { } class C implements A, Iterator { /** * (PHP 5 &gt;= 5.0.0)<br/> * Return the current element * @link http://php.net/manual/en/iterator.current.php * @return mixed Can return any type. */ public function current() { // TODO: Implement current() method. } /** * (PHP 5 &gt;= 5.0.0)<br/> * Move forward to next element * @link http://php.net/manual/en/iterator.next.php * @return void Any returned value is ignored. */ public function next() { // TODO: Implement next() method. } /** * (PHP 5 &gt;= 5.0.0)<br/> * Return the key of the current element * @link http://php.net/manual/en/iterator.key.php * @return mixed scalar on success, or null on failure. */ public function key() { // TODO: Implement key() method. } /** * (PHP 5 &gt;= 5.0.0)<br/> * Checks if current position is valid * @link http://php.net/manual/en/iterator.valid.php * @return boolean The return value will be casted to boolean and then evaluated. * Returns true on success or false on failure. */ public function valid() { // TODO: Implement valid() method. } /** * (PHP 5 &gt;= 5.0.0)<br/> * Rewind the Iterator to the first element * @link http://php.net/manual/en/iterator.rewind.php * @return void Any returned value is ignored. */ public function rewind() { // TODO: Implement rewind() method. } } $c = new C();

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.0080.00818.55
8.3.50.0080.01222.03
8.3.40.0040.01118.71
8.3.30.0100.00318.71
8.3.20.0040.00418.79
8.3.10.0040.00420.80
8.3.00.0080.00023.48
8.2.180.0110.00718.42
8.2.170.0170.00322.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00917.75
8.2.110.0050.00520.53
8.2.100.0060.00617.72
8.2.90.0040.00419.19
8.2.80.0040.00418.05
8.2.70.0040.00417.50
8.2.60.0080.00017.80
8.2.50.0060.00318.07
8.2.40.0040.00418.22
8.2.30.0040.00421.27
8.2.20.0050.00217.66
8.2.10.0070.00017.70
8.2.00.0040.00417.66
8.1.280.0140.00025.92
8.1.270.0000.01123.96
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0030.00622.35
8.1.230.0120.00020.97
8.1.220.0030.00518.77
8.1.210.0000.00818.98
8.1.200.0040.00417.35
8.1.190.0040.00417.30
8.1.180.0000.00818.10
8.1.170.0000.00918.59
8.1.160.0000.00718.98
8.1.150.0000.00818.70
8.1.140.0080.00017.48
8.1.130.0030.00317.84
8.1.120.0000.00717.47
8.1.110.0060.00417.44
8.1.100.0000.00817.45
8.1.90.0040.00417.49
8.1.80.0030.00317.53
8.1.70.0030.00317.42
8.1.60.0050.00317.49
8.1.50.0060.00317.51
8.1.40.0090.00017.53
8.1.30.0040.00417.51
8.1.20.0030.00617.55
8.1.10.0040.00417.55
8.1.00.0060.00317.50
8.0.300.0030.00319.98
8.0.290.0070.00017.16
8.0.280.0000.00718.46
8.0.270.0000.00817.27
8.0.260.0030.00316.82
8.0.250.0000.00716.92
8.0.240.0060.00316.86
8.0.230.0000.00717.00
8.0.220.0040.00416.88
8.0.210.0040.00416.90
8.0.200.0030.00316.98
8.0.190.0000.00716.86
8.0.180.0040.00416.99
8.0.170.0040.00416.91
8.0.160.0000.00716.91
8.0.150.0040.00416.88
8.0.140.0040.00416.77
8.0.130.0080.00013.34
8.0.120.0050.00316.90
8.0.110.0080.00016.95
8.0.100.0000.00716.83
8.0.90.0030.00316.77
8.0.80.0100.01316.89
8.0.70.0030.00316.85
8.0.60.0050.00216.78
8.0.50.0040.00416.87
8.0.30.0090.01017.01
8.0.20.0100.00717.40
8.0.10.0040.00416.82
8.0.00.0130.00716.66
7.4.330.0030.00314.70
7.4.320.0060.00016.63
7.4.300.0060.00016.54
7.4.290.0070.00016.51
7.4.280.0000.00716.48
7.4.270.0000.00616.57
7.4.260.0000.00513.36
7.4.250.0050.00216.50
7.4.240.0040.00416.43
7.4.230.0000.00716.31
7.4.220.0030.01716.67
7.4.210.0100.00616.52
7.4.200.0000.00816.64
7.4.190.0000.00716.68
7.4.160.0110.01116.52
7.4.150.0140.00417.40
7.4.140.0080.01017.86
7.4.130.0070.01016.45
7.4.120.0090.00816.38
7.4.110.0100.00716.45
7.4.100.0120.00916.43
7.4.90.0100.00716.59
7.4.80.0050.01119.37
7.4.70.0060.01016.51
7.4.60.0030.01616.46
7.4.50.0040.00016.21
7.4.40.0060.01022.52
7.4.30.0070.01016.58
7.4.00.0080.00814.88
7.3.330.0000.00513.18
7.3.320.0020.00213.15
7.3.310.0000.00716.27
7.3.300.0030.00516.22
7.3.290.0140.00016.17
7.3.280.0080.00716.24
7.3.270.0100.00817.40
7.3.260.0130.00818.24
7.3.250.0100.01016.38
7.3.240.0040.01716.22
7.3.230.0070.01016.49
7.3.210.0150.00616.39
7.3.200.0130.00319.39
7.3.190.0150.00616.50
7.3.180.0040.01216.41
7.3.170.0130.00316.27
7.3.160.0060.00916.19
7.3.120.0110.00314.96
7.2.330.0120.00916.52
7.2.320.0090.00916.27
7.2.310.0100.01316.60
7.2.300.0030.01316.43
7.2.290.0130.00916.67
7.2.00.0120.00919.08
7.1.100.0070.00718.03
7.1.70.0040.00417.03
7.1.60.0140.00719.40
7.1.50.0240.01234.65
7.1.00.0000.03722.51
7.0.200.0030.00516.58
7.0.140.0070.07321.93
7.0.80.0170.07320.01
7.0.70.0070.07319.92
7.0.60.0100.07719.92
7.0.50.0130.07320.38
7.0.40.0070.09019.94
7.0.30.0030.08719.95
7.0.20.0100.07720.13
7.0.10.0100.05720.08
7.0.00.0070.07320.10
5.6.280.0000.07320.91
5.6.230.0130.07320.69
5.6.220.0100.08320.62
5.6.210.0100.05320.77
5.6.200.0130.04721.07
5.6.190.0100.08021.14
5.6.180.0100.08021.00
5.6.170.0070.04320.97
5.6.160.0030.09021.00
5.6.150.0130.05021.14
5.6.140.0130.07320.94
5.6.130.0070.05720.96
5.6.120.0070.05021.01
5.6.110.0130.06721.05
5.6.100.0200.07721.07
5.6.90.0200.06021.00
5.6.80.0070.06720.53
5.6.70.0070.08020.43
5.6.60.0030.07020.51
5.6.50.0070.07020.40
5.6.40.0030.09020.32
5.6.30.0070.04020.38
5.6.20.0170.07020.41
5.6.10.0070.08020.45
5.6.00.0100.07320.29
5.5.370.0130.07320.46
5.5.360.0100.07720.50
5.5.350.0130.07020.39
5.5.340.0200.07320.88
5.5.330.0100.08020.77
5.5.320.0130.07720.90
5.5.310.0030.08020.73
5.5.300.0070.06720.91
5.5.290.0030.07020.73
5.5.280.0130.08020.93
5.5.270.0030.08320.89
5.5.260.0100.05020.85
5.5.250.0070.07020.56
5.5.240.0100.07720.21
5.5.230.0130.07720.29
5.5.220.0130.07320.15
5.5.210.0100.04720.31
5.5.200.0030.08320.24
5.5.190.0000.08720.16
5.5.180.0030.07020.18
5.5.160.0000.06020.13
5.5.150.0030.08720.20
5.5.140.0000.07320.26
5.5.130.0070.08020.24
5.5.120.0100.07020.26
5.5.110.0070.08320.07
5.5.100.0100.04320.08
5.5.90.0170.07020.02
5.5.80.0030.05020.07
5.5.70.0130.06720.16
5.5.60.0030.07320.16
5.5.50.0130.07019.94
5.5.40.0130.07319.93
5.5.30.0100.07320.10
5.5.20.0100.07019.96
5.5.10.0070.06320.08
5.5.00.0070.07319.97
5.4.450.0000.04719.20
5.4.440.0170.04719.24
5.4.430.0100.07319.50
5.4.420.0100.05019.53
5.4.410.0100.06319.09
5.4.400.0000.08318.88
5.4.390.0130.06018.85
5.4.380.0100.07319.09
5.4.370.0070.07319.21
5.4.360.0130.05718.88
5.4.350.0030.06719.09
5.4.340.0030.04319.18
5.4.320.0030.04319.14
5.4.310.0070.08018.84
5.4.300.0070.06318.85
5.4.290.0030.07719.16
5.4.280.0070.06719.20
5.4.270.0070.07719.04
5.4.260.0030.05318.85
5.4.250.0130.07719.21
5.4.240.0100.03319.04
5.4.230.0070.06719.11
5.4.220.0100.07319.15
5.4.210.0100.07719.02
5.4.200.0030.09019.14
5.4.190.0030.08019.17
5.4.180.0170.07019.04
5.4.170.0100.07319.11
5.4.160.0070.04718.88
5.4.150.0070.07019.19
5.4.140.0100.03316.37
5.4.130.0100.07016.43
5.4.120.0100.06316.43
5.4.110.0100.07316.39
5.4.100.0000.05716.41
5.4.90.0070.08016.47
5.4.80.0070.06316.34
5.4.70.0100.07016.41
5.4.60.0000.08016.31
5.4.50.0030.03716.43
5.4.40.0030.05316.52
5.4.30.0100.06716.32
5.4.20.0070.07316.32
5.4.10.0030.07716.36
5.4.00.0030.05015.77
5.3.290.0070.07014.72
5.3.280.0100.06714.66
5.3.270.0130.07714.66
5.3.260.0070.05014.57
5.3.250.0070.06314.73
5.3.240.0170.06714.64
5.3.230.0070.05014.73
5.3.220.0100.05014.54
5.3.210.0070.06014.69
5.3.200.0000.08014.55
5.3.190.0130.06714.62
5.3.180.0070.04714.53
5.3.170.0100.07314.65
5.3.160.0100.07014.50
5.3.150.0070.04314.55
5.3.140.0070.08014.63
5.3.130.0070.07714.54
5.3.120.0070.07714.65
5.3.110.0100.07014.64
5.3.100.0070.04714.05
5.3.90.0130.06713.95
5.3.80.0030.08014.02
5.3.70.0030.07314.09
5.3.60.0130.06714.12
5.3.50.0070.06313.88
5.3.40.0030.07313.97
5.3.30.0130.07013.96
5.3.20.0070.05013.81
5.3.10.0030.06313.79
5.3.00.0070.03713.70
5.2.170.0070.06011.96
5.2.160.0070.04311.96
5.2.150.0070.04711.96
5.2.140.0130.05311.96
5.2.130.0100.05011.96
5.2.120.0070.06311.96
5.2.110.0070.03711.96
5.2.100.0000.04011.96
5.2.90.0000.05011.96
5.2.80.0030.03011.96
5.2.70.0070.02311.96
5.2.60.0100.03711.96
5.2.50.0000.03011.96
5.2.40.0030.02711.96
5.2.30.0000.03711.96
5.2.20.0030.02711.96
5.2.10.0070.02711.96
5.2.00.0070.02311.96
5.1.60.0100.01711.96
5.1.50.0000.02711.96
5.1.40.0030.03011.96
5.1.30.0070.02311.96
5.1.20.0030.02311.96
5.1.10.0070.03311.96
5.1.00.0000.03311.96
5.0.50.0000.04311.96
5.0.40.0070.01711.96
5.0.30.0130.02311.96
5.0.20.0000.02711.96
5.0.10.0000.02011.96
5.0.00.0100.02311.96
4.4.90.0070.01011.96
4.4.80.0030.02711.96
4.4.70.0030.01311.96
4.4.60.0000.01711.96
4.4.50.0000.02011.96
4.4.40.0000.02311.96
4.4.30.0030.02311.96
4.4.20.0030.02011.96
4.4.10.0000.01711.96
4.4.00.0000.02711.96
4.3.110.0000.01711.96
4.3.100.0000.02311.96
4.3.90.0000.02311.96
4.3.80.0030.02311.96
4.3.70.0000.03311.96
4.3.60.0030.01311.96
4.3.50.0030.03011.96
4.3.40.0030.02711.96
4.3.30.0000.02011.96
4.3.20.0000.01711.96
4.3.10.0030.01311.96
4.3.00.0000.01311.96

preferences:
46.59 ms | 401 KiB | 5 Q