3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface IDBResult { } class ResultIterator implements Iterator { private $_rs; private $_index = 0; private $_onLoad; function __construct(IDBResult $rs, callable $callback = null) { $this->_rs = $rs; $this->_onLoad = $callback ?: function($rec) { return $rec; }; } public function current() { return call_user_func($this->_onLoad, $this->_rec); } public function key() { return $this->_index; } public function next() { $this->_index++; $this->_rec = $this->_rs->FetchAssoc(); } public function rewind() { $this->_index = 0; $this->_rs->Rewind(); } public function valid() { return !is_null($this->_rec); } }

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.0070.01118.32
8.3.60.0140.00716.75
8.3.50.0190.00922.10
8.3.40.0110.00418.68
8.3.30.0090.00618.68
8.3.20.0000.00820.20
8.3.10.0080.00021.90
8.3.00.0070.00317.25
8.2.190.0040.01516.58
8.2.180.0110.00718.00
8.2.170.0160.00022.96
8.2.160.0070.00722.21
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0040.00419.54
8.2.110.0090.00021.18
8.2.100.0080.00417.75
8.2.90.0000.00819.23
8.2.80.0000.00817.97
8.2.70.0040.00817.38
8.2.60.0080.00317.92
8.2.50.0000.00818.07
8.2.40.0040.00418.03
8.2.30.0000.00717.95
8.2.20.0030.00517.64
8.2.10.0080.00018.02
8.2.00.0000.00717.68
8.1.280.0170.00025.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.99
8.1.230.0130.00018.98
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0030.00617.13
8.1.190.0000.00817.25
8.1.180.0030.00518.10
8.1.170.0040.00420.43
8.1.160.0000.00722.02
8.1.150.0040.00418.91
8.1.140.0000.00817.41
8.1.130.0000.00717.70
8.1.120.0000.00717.43
8.1.110.0040.00417.46
8.1.100.0040.00417.42
8.1.90.0020.00517.38
8.1.80.0070.00017.31
8.1.70.0050.00317.46
8.1.60.0000.00917.55
8.1.50.0060.00317.38
8.1.40.0040.00417.32
8.1.30.0040.00417.66
8.1.20.0000.00717.54
8.1.10.0030.00617.24
8.1.00.0090.00317.37
8.0.300.0070.00018.77
8.0.290.0070.00016.63
8.0.280.0000.00718.39
8.0.270.0040.00417.21
8.0.260.0030.00317.21
8.0.250.0000.00716.81
8.0.240.0000.00617.00
8.0.230.0070.00016.91
8.0.220.0070.00016.72
8.0.210.0040.00416.80
8.0.200.0030.00316.87
8.0.190.0050.00316.86
8.0.180.0030.00516.86
8.0.170.0080.00016.89
8.0.160.0040.00416.89
8.0.150.0000.00716.86
8.0.140.0000.00716.83
8.0.130.0000.00613.22
8.0.120.0000.00716.70
8.0.110.0000.00716.66
8.0.100.0070.00016.84
8.0.90.0040.00416.79
8.0.80.0100.01016.82
8.0.70.0040.00416.64
8.0.60.0040.00416.84
8.0.50.0040.00416.85
8.0.30.0100.00916.93
8.0.20.0080.01417.40
8.0.10.0000.00717.02
8.0.00.0090.00916.82
7.4.330.0030.00315.03
7.4.320.0000.00616.62
7.4.300.0030.00316.32
7.4.290.0000.00716.56
7.4.280.0050.00516.45
7.4.270.0030.00616.51
7.4.260.0060.00316.41
7.4.250.0040.00416.47
7.4.240.0050.00216.46
7.4.230.0030.00316.47
7.4.220.0060.01116.61
7.4.210.0070.01016.50
7.4.200.0070.00016.64
7.4.160.0090.00616.32
7.4.150.0190.00817.40
7.4.140.0100.01117.86
7.4.130.0110.00816.58
7.4.120.0120.00616.44
7.4.110.0090.00916.43
7.4.100.0130.00316.48
7.4.90.0000.01816.50
7.4.80.0110.01119.39
7.4.70.0000.01716.54
7.4.60.0100.00716.37
7.4.50.0000.00816.45
7.4.40.0070.01116.59
7.4.30.0090.01216.48
7.4.00.0060.00814.82
7.3.330.0030.00313.00
7.3.320.0070.00813.03
7.3.310.0030.00316.01
7.3.300.0030.00316.15
7.3.290.0040.00216.16
7.3.280.0050.01116.19
7.3.270.0000.01817.40
7.3.260.0130.00316.36
7.3.250.0110.01116.51
7.3.240.0060.01316.42
7.3.230.0160.00316.53
7.3.210.0090.00916.06
7.3.200.0090.00919.39
7.3.190.0100.01016.37
7.3.180.0100.00716.19
7.3.170.0130.00316.28
7.3.160.0050.01116.26
7.2.330.0060.01216.57
7.2.320.0070.01016.47
7.2.310.0110.00516.27
7.2.300.0100.01016.57
7.2.290.0140.00316.60
7.2.00.0060.00619.25
7.1.100.0000.01618.16
7.1.70.0040.00416.89
7.1.60.0110.01419.46
7.1.50.0130.02034.48
7.1.00.0100.06722.35
7.0.200.0080.00416.73
7.0.140.0070.06022.15
7.0.70.4330.04719.90
7.0.60.0170.08319.79
7.0.50.0030.04017.72
7.0.40.0130.08320.12
7.0.30.0300.07320.23
7.0.20.0330.07720.33
7.0.10.0230.03320.12
7.0.00.0030.06020.23
5.6.280.0000.07721.04
5.6.210.0070.06720.62
5.6.200.0030.08318.16
5.6.190.0030.08720.60
5.6.180.0230.04320.53
5.6.170.0430.07720.48
5.6.160.0070.04320.54
5.6.150.0100.06318.18
5.6.140.0070.08018.18
5.6.130.0100.05018.18
5.6.120.0130.07021.03
5.6.110.0070.07721.14
5.6.100.0070.08020.89
5.6.90.0100.07720.98
5.6.80.0070.08020.38
5.6.70.0270.07320.51
5.5.350.0100.07720.48
5.5.340.0070.08317.97
5.5.330.0030.05320.13
5.5.320.0100.04020.57
5.5.310.0170.04320.30
5.5.300.0070.08017.98
5.5.290.0100.03718.02
5.5.280.0130.08020.79
5.5.270.0070.04020.94
5.5.260.0130.08020.69
5.5.250.0000.04320.63
5.5.240.0070.04320.27
5.4.450.0230.07319.31
5.4.440.1230.05019.47
5.4.430.0830.06019.45
5.4.420.0770.05319.13
5.4.410.0100.07719.36
5.4.400.0130.05018.80
5.4.390.0200.06318.48
5.4.380.0370.04318.79
5.4.370.0170.04718.52
5.4.360.0300.05318.81
5.4.350.0230.05018.89
5.4.340.0270.05018.53
5.4.320.0130.05318.80
5.4.310.0230.05018.78
5.4.300.0270.04718.60
5.4.290.0200.05018.80
5.4.280.0170.06018.75
5.4.270.0100.05018.57
5.4.260.0330.04318.56
5.4.250.0270.05018.73
5.4.240.0270.05018.74
5.4.230.0070.06018.77
5.4.220.0030.06718.84
5.4.210.0230.06018.52
5.4.200.0200.06316.78
5.4.190.0170.06018.82
5.4.180.0130.05718.58
5.4.170.0200.05018.52
5.4.160.0330.05018.69
5.4.150.0230.06018.73
5.4.140.0470.05016.21
5.4.130.0100.05016.21
5.4.120.0270.05016.28
5.4.110.0130.05016.30
5.4.100.0200.05716.18
5.4.90.0970.06316.29
5.4.80.0330.05016.20
5.4.70.0230.05016.19
5.4.60.0370.04016.28
5.4.50.0170.05016.17
5.4.40.0430.05016.30
5.4.30.0670.05716.26
5.4.20.0100.06016.25
5.4.10.0270.05016.23
5.4.00.0230.04315.73
5.3.290.0200.06014.68
5.3.280.0130.05714.74
5.3.270.0200.05014.78
5.3.260.0170.05314.60
5.3.250.0170.05314.82
5.3.240.0130.05314.75
5.3.230.0200.05014.66
5.3.220.0170.05714.63
5.3.210.0230.04714.59
5.3.200.0170.04714.63
5.3.190.0100.05714.71
5.3.180.0130.05314.67
5.3.170.0200.04714.57
5.3.160.0270.04314.62
5.3.150.0200.04714.79
5.3.140.0230.04314.66
5.3.130.0200.05014.67
5.3.120.0230.05014.77
5.3.110.0230.07314.77
5.3.100.0200.04714.11
5.3.90.0170.05014.06
5.3.80.0230.04714.15
5.3.70.0130.06014.05
5.3.60.0230.04714.24
5.3.50.0170.05014.09
5.3.40.0170.05014.00
5.3.30.0230.05313.90
5.3.20.0230.06313.91
5.3.10.0170.06313.73
5.3.00.0630.06713.71
5.2.170.0700.04711.12
5.2.160.0700.04011.36
5.2.150.0630.04311.27
5.2.140.0700.03711.21
5.2.130.0730.04011.13
5.2.120.0030.04311.15
5.2.110.0070.04311.15
5.2.100.0100.03711.14
5.2.90.0130.03311.12
5.2.80.0130.04011.09
5.2.70.0000.05011.32
5.2.60.0630.03711.05
5.2.50.0630.04311.05
5.2.40.0500.04311.21
5.2.30.0530.04011.18
5.2.20.0470.04311.00
5.2.10.0130.03310.93
5.2.00.0270.03710.92
5.1.60.0130.0379.98
5.1.50.0130.03010.01
5.1.40.0070.03710.16
5.1.30.0170.03310.46
5.1.20.0200.02710.48
5.1.10.0100.03310.07
5.1.00.0300.03310.11
5.0.50.0200.0208.75
5.0.40.0100.0238.41
5.0.30.0030.0478.45
5.0.20.0100.0238.41
5.0.10.0030.0308.20
5.0.00.0030.0438.27
4.4.90.0070.0205.89
4.4.80.0100.0175.88
4.4.70.0030.0235.86
4.4.60.0100.0175.88
4.4.50.0070.0275.91
4.4.40.0070.0335.87
4.4.30.0170.0205.90
4.4.20.0000.0275.97
4.4.10.0170.0335.95
4.4.00.0030.0405.91
4.3.110.0030.0235.80
4.3.100.0170.0205.83
4.3.90.0030.0235.86
4.3.80.0070.0335.82
4.3.70.0130.0235.78
4.3.60.0030.0205.82
4.3.50.0170.0275.82
4.3.40.0000.0375.73
4.3.30.0030.0204.68
4.3.20.0030.0204.56
4.3.10.0030.0234.59
4.3.00.0030.0236.93

preferences:
39.78 ms | 401 KiB | 5 Q