3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Data implements \ArrayAccess { private $_data; public function __construct($data = []) { $this->_data = $data; } public function offsetExists($offset) { echo 'EXISTS: ' . $offset . PHP_EOL; return isset($this->_data[$offset]); } public function &offsetGet($offset) { echo 'GET: ' . $offset . PHP_EOL; $returnValue = null; if (!isset($this->_data[$offset])) { return $returnValue; } $returnValue = $this->_data[$offset]; return $returnValue; } public function offsetSet($offset, $value) { $this->_data[$offset] = $value; } public function offsetUnset($offset) { unset($this->_data[$offset]); } }

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.0070.01116.75
8.3.50.0320.00722.05
8.3.40.0070.00718.72
8.3.30.0060.01218.57
8.3.20.0070.00020.38
8.3.10.0040.00423.39
8.3.00.0080.00019.07
8.2.180.0090.00618.41
8.2.170.0110.00722.96
8.2.160.0070.00720.23
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0040.00717.25
8.2.120.0040.00426.35
8.2.110.0040.00420.38
8.2.100.0060.00618.09
8.2.90.0040.00419.08
8.2.80.0030.00617.97
8.2.70.0050.00317.38
8.2.60.0030.00517.93
8.2.50.0040.00418.07
8.2.40.0000.00819.19
8.2.30.0080.00020.50
8.2.20.0090.00017.56
8.2.10.0070.00018.05
8.2.00.0000.00717.92
8.1.280.0130.00725.92
8.1.270.0060.00623.84
8.1.260.0000.00728.09
8.1.250.0030.00528.09
8.1.240.0060.00323.96
8.1.230.0070.00419.17
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0060.00317.45
8.1.180.0000.00818.10
8.1.170.0030.00518.66
8.1.160.0070.00022.02
8.1.150.0030.00518.79
8.1.140.0040.00419.52
8.1.130.0030.00517.64
8.1.120.0000.00717.37
8.1.110.0000.00717.25
8.1.100.0000.00817.37
8.1.90.0050.00317.41
8.1.80.0060.00317.32
8.1.70.0040.00417.36
8.1.60.0080.00017.42
8.1.50.0030.00517.46
8.1.40.0090.00017.51
8.1.30.0000.00917.52
8.1.20.0080.00017.36
8.1.10.0040.00417.44
8.1.00.0000.00717.29
8.0.300.0030.00518.77
8.0.290.0030.00616.63
8.0.280.0000.00718.41
8.0.270.0030.00317.20
8.0.260.0000.00617.14
8.0.250.0000.00716.88
8.0.240.0000.00716.92
8.0.230.0000.00716.86
8.0.220.0040.00416.86
8.0.210.0030.00616.87
8.0.200.0000.00716.86
8.0.190.0040.00416.86
8.0.180.0040.00416.70
8.0.170.0000.00816.89
8.0.160.0040.00316.79
8.0.150.0050.00316.79
8.0.140.0030.00316.84
8.0.130.0060.00013.30
8.0.120.0040.00416.90
8.0.110.0000.00716.75
8.0.100.0040.00416.93
8.0.90.0000.00816.63
8.0.80.0140.00416.75
8.0.70.0000.00716.95
8.0.60.0090.00016.82
8.0.50.0000.00716.80
8.0.30.0050.01217.01
8.0.20.0110.00817.40
8.0.10.0000.00716.84
8.0.00.0040.01216.64
7.4.330.0040.00016.83
7.4.320.0030.00316.50
7.4.300.0030.00316.42
7.4.290.0070.00016.45
7.4.280.0050.00316.53
7.4.270.0030.00316.42
7.4.260.0030.00616.52
7.4.250.0030.00316.33
7.4.240.0060.00216.48
7.4.230.0000.00716.32
7.4.220.0070.01116.39
7.4.210.0070.00916.48
7.4.200.0040.00416.43
7.4.160.0040.01216.29
7.4.150.0070.01017.40
7.4.140.0180.02417.86
7.4.130.0120.00916.50
7.4.120.0080.01016.45
7.4.110.0140.00716.45
7.4.100.0170.00016.52
7.4.90.0090.00916.28
7.4.80.0130.00619.39
7.4.70.0100.01416.32
7.4.60.0000.01616.42
7.4.50.0100.00616.53
7.4.40.0100.00616.51
7.4.30.0150.00616.41
7.4.00.0080.00814.77
7.3.330.0000.00513.24
7.3.320.0060.00012.96
7.3.310.0000.00716.04
7.3.300.0060.00016.18
7.3.290.0040.00416.19
7.3.280.0070.01016.20
7.3.270.0100.00617.40
7.3.260.0130.00616.54
7.3.250.0090.00916.25
7.3.240.0110.01116.44
7.3.230.0090.00916.39
7.3.210.0040.01416.31
7.3.200.0030.01916.31
7.3.190.0070.00916.46
7.3.180.0070.01016.20
7.3.170.0110.00516.46
7.3.160.0130.00316.36
7.2.330.0140.00316.56
7.2.320.0090.00716.32
7.2.310.0130.00716.50
7.2.300.0030.01316.36
7.2.290.0060.01116.61
7.2.60.0070.00716.55
7.1.200.0080.00315.59
7.1.70.0070.00716.95
7.1.60.0000.01217.25
7.1.50.0210.01434.36
7.1.00.0070.07322.40
7.0.200.0080.00816.69
7.0.60.0030.04019.92
7.0.50.0030.07017.86
7.0.40.0000.04720.23
7.0.30.0230.05720.07
7.0.20.0370.06720.19
7.0.10.0070.04320.12
7.0.00.0100.05020.07
5.6.280.0100.03020.87
5.6.210.0070.07720.54
5.6.200.0000.05718.18
5.6.190.0070.04020.52
5.6.180.0470.07320.77
5.6.170.0270.03720.55
5.6.160.0070.08720.61
5.6.150.0030.06718.21
5.6.140.0070.05318.14
5.6.130.0030.04018.21
5.6.120.0070.06720.99
5.6.110.0130.07321.00
5.6.100.0270.07021.04
5.6.90.0100.08720.97
5.6.80.0100.07720.40
5.5.350.0200.08020.53
5.5.340.0100.06318.04
5.5.330.0070.08320.57
5.5.320.0030.08020.20
5.5.310.0170.04320.37
5.5.300.0070.03717.95
5.5.290.0100.04317.96
5.5.280.0130.04720.85
5.5.270.0000.06020.77
5.5.260.0200.06720.77
5.5.250.0030.08320.64
5.5.240.0170.07020.16

preferences:
46.2 ms | 401 KiB | 5 Q