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])) { $this->_data[$offset]=new Data(); //return new ; } $returnValue = &$this->_data[$offset]; return $returnValue; } public function offsetSet($offset, $value) { echo 'SET: ' . $offset . PHP_EOL; var_dump($value); $this->_data[$offset] = $value; } public function offsetUnset($offset) { unset($this->_data[$offset]); } } $data = new Data(); var_dump(isset($data['aaaaa']['bbbbbb']['ccccc'])); $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.0170.00318.55
8.3.50.0120.00317.98
8.3.40.0070.00718.93
8.3.30.0140.00718.82
8.3.20.0040.00420.25
8.3.10.0000.00821.73
8.3.00.0060.00319.38
8.2.180.0040.01116.50
8.2.170.0140.00022.96
8.2.160.0130.00620.34
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0030.00617.75
8.2.120.0110.00726.35
8.2.110.0140.00322.25
8.2.100.0090.00317.99
8.2.90.0050.00319.27
8.2.80.0060.00617.97
8.2.70.0030.00617.63
8.2.60.0000.00818.05
8.2.50.0040.00418.07
8.2.40.0040.00419.41
8.2.30.0040.00420.52
8.2.20.0040.00417.67
8.2.10.0040.00418.25
8.2.00.0060.00318.13
8.1.280.0100.01025.92
8.1.270.0040.00723.94
8.1.260.0040.00428.09
8.1.250.0030.00528.09
8.1.240.0090.00020.88
8.1.230.0070.00319.01
8.1.220.0000.00817.75
8.1.210.0080.00018.77
8.1.200.0030.00617.38
8.1.190.0000.00817.70
8.1.180.0050.00318.10
8.1.170.0000.00918.70
8.1.160.0070.00022.03
8.1.150.0000.00818.97
8.1.140.0040.00419.59
8.1.130.0070.00017.72
8.1.120.0050.00217.52
8.1.110.0050.00217.47
8.1.100.0030.00517.51
8.1.90.0070.00317.44
8.1.80.0030.00417.45
8.1.70.0000.00717.43
8.1.60.0050.00317.60
8.1.50.0060.00317.55
8.1.40.0000.01017.56
8.1.30.0000.00817.66
8.1.20.0000.00817.49
8.1.10.0040.00417.59
8.1.00.0030.00617.48
8.0.300.0080.00018.77
8.0.290.0070.00016.75
8.0.280.0060.00318.36
8.0.270.0030.00317.26
8.0.260.0060.00017.27
8.0.250.0000.00717.00
8.0.240.0040.00416.94
8.0.230.0030.00516.99
8.0.220.0050.00316.82
8.0.210.0030.00416.89
8.0.200.0000.00616.95
8.0.190.0050.00316.93
8.0.180.0000.00816.89
8.0.170.0080.00016.83
8.0.160.0070.00016.86
8.0.150.0030.00316.84
8.0.140.0070.00016.74
8.0.130.0070.00013.27
8.0.120.0040.00416.89
8.0.110.0030.00516.88
8.0.100.0000.00716.73
8.0.90.0080.00016.90
8.0.80.0090.00616.86
8.0.70.0050.00316.91
8.0.60.0000.00816.91
8.0.50.0000.00716.87
8.0.30.0100.00817.16
8.0.20.0100.00917.40
8.0.10.0050.00217.09
8.0.00.0100.00816.88
7.4.330.0030.00316.67
7.4.320.0000.00616.63
7.4.300.0060.00016.45
7.4.290.0040.00416.59
7.4.280.0030.00616.52
7.4.270.0070.00016.60
7.4.260.0090.00016.52
7.4.250.0080.00016.61
7.4.240.0020.00516.48
7.4.230.0070.00016.69
7.4.220.0030.01416.46
7.4.210.0050.01116.66
7.4.200.0030.00316.36
7.4.160.0130.00316.52
7.4.150.0110.00717.40
7.4.140.0180.00317.86
7.4.130.0090.01016.50
7.4.120.0110.00816.62
7.4.110.0100.00716.49
7.4.100.0080.00916.50
7.4.90.0140.00416.73
7.4.80.0090.00919.39
7.4.70.0080.01116.46
7.4.60.0150.00616.43
7.4.50.0110.00416.30
7.4.40.0180.00516.46
7.4.30.0120.00616.59
7.4.00.0030.01315.05
7.3.330.0070.00013.46
7.3.320.0050.00013.30
7.3.310.0000.00716.42
7.3.300.0000.00716.27
7.3.290.0030.00316.26
7.3.280.0060.01316.38
7.3.270.0150.00317.40
7.3.260.0060.01216.61
7.3.250.0140.00816.37
7.3.240.0080.01116.38
7.3.230.0090.01316.39
7.3.210.0120.00616.64
7.3.200.0060.01516.48
7.3.190.0030.01816.58
7.3.180.0130.00716.32
7.3.170.0070.01416.38
7.3.160.0160.00016.47
7.3.10.0150.00316.28
7.3.00.0090.00616.39
7.2.330.0120.00916.71
7.2.320.0070.01016.71
7.2.310.0070.01016.85
7.2.300.0110.00716.43
7.2.290.0090.01216.53
7.2.130.0060.01216.75
7.2.120.0090.00616.56
7.2.110.0070.01416.70
7.2.100.0060.01316.65
7.2.90.0140.00316.81
7.2.80.0030.01016.97
7.2.70.0060.01016.84
7.2.60.0080.00616.77
7.2.50.0100.00716.82
7.2.40.0080.00416.99
7.2.30.0070.01017.14
7.2.20.0080.00816.78
7.2.10.0050.00816.88
7.2.00.0180.01018.07
7.1.250.0060.00915.38
7.1.240.0030.00615.73
7.1.230.0160.00315.81
7.1.220.0130.00315.77
7.1.210.0100.00315.64
7.1.200.0090.00515.70
7.1.190.0070.00715.77
7.1.180.0060.01015.50
7.1.170.0100.00715.92
7.1.160.0100.00615.58
7.1.150.0070.00715.74
7.1.140.0060.00915.93
7.1.130.0070.01015.60
7.1.120.0130.00315.96
7.1.110.0060.00915.90
7.1.100.0080.00516.86
7.1.90.0070.00415.47
7.1.80.0030.01015.90
7.1.70.0080.00616.53
7.1.60.0120.00817.62
7.1.50.0080.00516.40
7.1.40.0000.01515.75
7.1.30.0060.00915.90
7.1.20.0060.00615.61
7.1.10.0060.01315.75
7.1.00.0070.04218.93
7.0.330.0150.00015.28
7.0.320.0100.00715.27
7.0.310.0070.01115.42
7.0.300.0080.00815.25
7.0.290.0070.00715.24
7.0.280.0070.00715.28
7.0.270.0140.00015.23
7.0.260.0040.00715.26
7.0.250.0060.01015.25
7.0.240.0070.00715.35
7.0.230.0100.00715.49
7.0.220.0060.00615.35
7.0.210.0100.00715.37
7.0.200.0040.00915.96
7.0.190.0100.00715.61
7.0.180.0070.00715.40
7.0.170.0110.00415.46
7.0.160.0060.00615.50
7.0.150.0070.00715.12
7.0.140.0110.00415.17
7.0.130.0160.00315.54
7.0.120.0130.00015.45
7.0.110.0050.00715.33
7.0.100.0000.01515.32
7.0.90.0080.00815.48
7.0.80.0090.00615.41
7.0.70.0090.00615.46
7.0.60.0080.02317.43
7.0.50.0080.05016.67
7.0.40.0050.04116.67
7.0.30.0190.03816.77
7.0.20.0150.04416.83
7.0.10.0020.02716.75
7.0.00.0110.03116.81
5.6.380.0060.00614.61
5.6.370.0030.00614.38
5.6.360.0030.00914.62
5.6.350.0030.00614.41
5.6.340.0000.00914.33
5.6.330.0030.00614.18
5.6.320.0090.00014.61
5.6.310.0040.00414.43
5.6.300.0070.00714.49
5.6.290.0070.00714.22
5.6.280.0040.02817.55
5.6.270.0090.00614.45
5.6.260.0130.00314.74
5.6.250.0000.01414.68
5.6.240.0100.00014.46
5.6.230.0030.00914.35
5.6.220.0030.01014.11
5.6.210.0050.04817.42
5.6.200.0030.02516.23
5.6.190.0070.02317.50
5.6.180.0250.03017.37
5.6.170.0160.04117.38
5.6.160.0070.04917.58
5.6.150.0070.04916.31
5.6.140.0130.02316.26
5.6.130.0070.04416.19
5.6.120.0100.04617.66
5.6.110.0100.04317.48
5.6.100.0080.04517.57
5.6.90.0070.04817.56
5.6.80.0070.02317.21
5.6.70.0090.00614.31
5.6.60.0090.00914.25
5.6.50.0000.01714.28
5.6.40.0110.00914.21
5.6.30.0090.00614.26
5.6.20.0090.00914.52
5.6.10.0120.00614.37
5.6.00.0100.00514.40
5.5.380.0120.00311.05
5.5.370.0060.00911.24
5.5.360.0120.00811.25
5.5.350.0160.04315.79
5.5.340.0070.02414.83
5.5.330.0090.03715.82
5.5.320.0070.03915.78
5.5.310.0120.02415.80
5.5.300.0070.02314.47
5.5.290.0070.04714.73
5.5.280.0090.03415.97
5.5.270.0100.03616.15
5.5.260.0130.03816.20
5.5.250.0070.04816.03
5.5.240.1550.02215.79
5.5.230.0040.01311.33
5.5.220.0040.00811.38
5.5.210.0000.01011.23
5.5.200.0040.00811.22
5.5.190.0000.01311.16
5.5.180.0030.00610.87
5.5.170.0070.00311.02
5.5.160.0080.00411.04
5.5.150.0120.00211.19
5.5.140.0000.00911.43
5.5.130.0030.00911.27
5.5.120.0030.01011.18
5.5.110.0090.00010.97
5.5.100.0030.00311.39
5.5.90.0100.00311.23
5.5.80.0060.00611.09
5.5.70.0000.01111.27
5.5.60.0000.00910.97
5.5.50.0080.00011.17
5.5.40.0040.00811.13
5.5.30.0060.00311.07
5.5.20.0130.00310.89
5.5.10.0070.00011.18
5.5.00.0060.00611.18

preferences:
51.85 ms | 400 KiB | 5 Q