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) { echo 'SET: ' . $offset . PHP_EOL; $this->_data[$offset] = $value; } public function offsetUnset($offset) { unset($this->_data[$offset]); } } $data = new Data(); $data['aaaaa']['bbbbbb']['ccccc']='dddddd'; var_dump($data);

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.0150.00616.50
8.3.50.0150.00722.05
8.3.40.0040.01118.80
8.3.30.0140.00018.76
8.3.20.0040.00420.33
8.3.10.0070.00321.73
8.3.00.0080.00019.38
8.2.180.0120.00316.75
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00717.38
8.2.120.0000.00826.35
8.2.110.0060.00320.27
8.2.100.0080.00418.28
8.2.90.0080.00018.95
8.2.80.0060.00617.97
8.2.70.0040.00417.50
8.2.60.0050.00317.93
8.2.50.0090.00018.07
8.2.40.0000.00819.28
8.2.30.0050.00320.52
8.2.20.0090.00017.67
8.2.10.0000.00818.20
8.2.00.0040.00418.13
8.1.280.0100.00725.92
8.1.270.0000.01023.92
8.1.260.0050.00228.09
8.1.250.0040.00428.09
8.1.240.0090.00022.18
8.1.230.0050.00519.11
8.1.220.0040.00417.79
8.1.210.0050.00318.77
8.1.200.0090.00017.48
8.1.190.0000.00717.58
8.1.180.0040.00418.10
8.1.170.0030.00518.49
8.1.160.0040.00421.98
8.1.150.0000.00718.83
8.1.140.0040.00419.63
8.1.130.0000.00717.83
8.1.120.0050.00317.53
8.1.110.0040.00417.48
8.1.100.0040.00417.46
8.1.90.0040.00717.48
8.1.80.0000.00717.43
8.1.70.0050.00217.45
8.1.60.0030.00617.61
8.1.50.0000.00817.45
8.1.40.0000.01217.52
8.1.30.0040.00417.64
8.1.20.0070.00017.58
8.1.10.0070.00017.56
8.1.00.0050.00317.41
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0040.00418.45
8.0.270.0030.00317.24
8.0.260.0000.00717.21
8.0.250.0000.00716.98
8.0.240.0040.00416.97
8.0.230.0000.00816.95
8.0.220.0030.00316.95
8.0.210.0060.00316.95
8.0.200.0000.00716.96
8.0.190.0040.00417.01
8.0.180.0000.00816.97
8.0.170.0000.00816.97
8.0.160.0070.00017.02
8.0.150.0030.00316.74
8.0.140.0000.00716.86
8.0.130.0050.00013.29
8.0.120.0040.00416.79
8.0.110.0000.00816.97
8.0.100.0050.00216.75
8.0.90.0000.00716.76
8.0.80.0060.01016.84
8.0.70.0050.00216.92
8.0.60.0040.00416.75
8.0.50.0000.00716.97
8.0.30.0080.01017.15
8.0.20.0080.01217.40
8.0.10.0040.00416.93
8.0.00.0110.00916.72
7.4.330.0050.00016.73
7.4.320.0030.00316.63
7.4.300.0000.00616.51
7.4.290.0000.00716.53
7.4.280.0040.00416.45
7.4.270.0000.00716.64
7.4.260.0070.00416.52
7.4.250.0040.00416.47
7.4.240.0050.00216.48
7.4.230.0000.00716.71
7.4.220.0120.00616.64
7.4.210.0070.00816.58
7.4.200.0030.00316.67
7.4.160.0110.01116.44
7.4.150.0030.02017.40
7.4.140.0060.01417.86
7.4.130.0090.01016.50
7.4.120.0050.01316.51
7.4.110.0090.00916.28
7.4.100.0160.00816.57
7.4.90.0060.01216.47
7.4.80.0060.01419.39
7.4.70.0110.00516.59
7.4.60.0170.00016.51
7.4.50.0030.01516.25
7.4.40.0080.00916.51
7.4.30.0080.01216.76
7.4.00.0090.00015.04
7.3.330.0030.00313.38
7.3.320.0030.00313.14
7.3.310.0040.00416.19
7.3.300.0070.00016.42
7.3.290.0000.00716.34
7.3.280.0110.00816.37
7.3.270.0100.00717.40
7.3.260.0060.01316.46
7.3.250.0110.01016.57
7.3.240.0080.00816.46
7.3.230.0070.01116.55
7.3.210.0070.01116.46
7.3.200.0030.01216.39
7.3.190.0130.00316.37
7.3.180.0000.01916.53
7.3.170.0100.01016.35
7.3.160.0120.01216.34
7.3.10.0040.01116.41
7.3.00.0030.00516.63
7.2.330.0070.01016.86
7.2.320.0030.01416.45
7.2.310.0100.00716.34
7.2.300.0130.00316.86
7.2.290.0080.00916.87
7.2.130.0030.01016.76
7.2.120.0030.00616.74
7.2.110.0040.00716.73
7.2.100.0060.00616.67
7.2.90.0080.00317.00
7.2.80.0060.00616.65
7.2.70.0030.00716.79
7.2.60.0020.01016.80
7.2.50.0080.00816.65
7.2.40.0060.00317.01
7.2.30.0030.01016.74
7.2.20.0060.00916.66
7.2.10.0070.00416.67
7.2.00.0070.00818.06
7.1.250.0070.00715.69
7.1.200.0070.00715.73
7.1.100.0060.00618.06
7.1.70.0000.00717.25
7.1.60.0100.01019.36
7.1.50.0030.00817.06
7.1.00.0070.07322.33
7.0.200.7190.00314.59
7.0.60.0030.04319.82
7.0.50.0000.09017.88
7.0.40.0070.05720.24
7.0.30.0170.04720.11
7.0.20.0270.06020.25
7.0.10.0070.04020.07
7.0.00.0130.07720.05
5.6.280.0030.05721.00
5.6.210.0130.07320.48
5.6.200.0030.07018.16
5.6.190.0000.04320.77
5.6.180.0600.06320.34
5.6.170.0230.04320.54
5.6.160.0070.05320.47
5.6.150.0070.08318.19
5.6.140.0130.07018.18
5.6.130.0000.04318.14
5.6.120.0100.06021.02
5.6.110.0100.06720.92
5.6.100.0170.07320.99
5.6.90.0070.09020.97
5.6.80.0130.07320.51
5.5.350.0230.06720.39
5.5.340.0070.08018.04
5.5.330.0100.08020.40
5.5.320.0030.05320.32
5.5.310.0230.04720.38
5.5.300.0070.03717.98
5.5.290.0100.08317.95
5.5.280.0070.08320.81
5.5.270.0000.05020.73
5.5.260.0100.08320.72
5.5.250.0130.08320.80
5.5.240.3400.04320.27

preferences:
41.48 ms | 401 KiB | 5 Q