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; var_dump($value); $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.0120.00916.75
8.3.50.0160.00618.17
8.3.40.0150.00018.84
8.3.30.0080.00818.82
8.3.20.0050.00320.25
8.3.10.0050.00321.89
8.3.00.0040.00419.38
8.2.180.0120.00316.75
8.2.170.0100.01022.96
8.2.160.0070.00720.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.01017.63
8.2.120.0040.00426.35
8.2.110.0030.00720.50
8.2.100.0090.00318.03
8.2.90.0040.00419.40
8.2.80.0030.00617.97
8.2.70.0040.00417.38
8.2.60.0030.00618.05
8.2.50.0000.00818.07
8.2.40.0040.00419.46
8.2.30.0030.00320.68
8.2.20.0030.00517.63
8.2.10.0070.00018.06
8.2.00.0050.00318.00
8.1.280.0150.00025.92
8.1.270.0090.00323.96
8.1.260.0040.00428.09
8.1.250.0080.00028.09
8.1.240.0030.00623.76
8.1.230.0070.00319.01
8.1.220.0040.00417.76
8.1.210.0090.00018.77
8.1.200.0040.00417.47
8.1.190.0050.00317.54
8.1.180.0040.00418.10
8.1.170.0000.00818.65
8.1.160.0070.00022.08
8.1.150.0040.00418.84
8.1.140.0050.00319.57
8.1.130.0000.00717.70
8.1.120.0000.00717.52
8.1.110.0000.00717.43
8.1.100.0050.00317.45
8.1.90.0030.00717.48
8.1.80.0050.00317.45
8.1.70.0030.00317.36
8.1.60.0040.00417.48
8.1.50.0030.00517.56
8.1.40.0080.00317.49
8.1.30.0060.00317.59
8.1.20.0040.00417.61
8.1.10.0040.00417.65
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0060.00318.45
8.0.270.0000.00717.25
8.0.260.0000.00617.27
8.0.250.0020.00516.98
8.0.240.0030.00516.94
8.0.230.0000.00716.98
8.0.220.0000.00716.91
8.0.210.0030.00316.79
8.0.200.0030.00316.89
8.0.190.0000.00716.94
8.0.180.0020.00516.98
8.0.170.0060.00316.95
8.0.160.0080.00016.80
8.0.150.0000.00716.82
8.0.140.0000.00816.75
8.0.130.0000.00613.32
8.0.120.0080.00016.77
8.0.110.0030.00516.74
8.0.100.0050.00316.86
8.0.90.0000.00716.80
8.0.80.0070.01316.85
8.0.70.0050.00316.72
8.0.60.0040.00416.77
8.0.50.0080.00016.72
8.0.30.0070.00917.03
8.0.20.0090.01017.40
8.0.10.0040.00416.85
8.0.00.0110.00816.67
7.4.330.0030.00316.85
7.4.320.0070.00016.61
7.4.300.0000.00616.64
7.4.290.0000.00716.41
7.4.280.0050.00516.39
7.4.270.0000.00816.48
7.4.260.0030.00716.43
7.4.250.0000.00716.46
7.4.240.0040.00416.43
7.4.230.0000.00716.63
7.4.220.0070.01116.55
7.4.210.0100.00616.61
7.4.200.0050.00216.68
7.4.160.0060.01516.39
7.4.150.0090.00917.40
7.4.140.0130.01117.86
7.4.130.0100.01016.45
7.4.120.0120.00616.53
7.4.110.0120.00616.57
7.4.100.0130.00316.44
7.4.90.0100.00616.50
7.4.80.0080.01219.39
7.4.70.0200.00316.48
7.4.60.0060.01016.49
7.4.50.0070.00716.31
7.4.40.0100.01016.35
7.4.30.0170.00716.63
7.4.00.0070.01014.90
7.3.330.0000.00613.18
7.3.320.0000.00513.39
7.3.310.0040.00416.32
7.3.300.0000.00616.40
7.3.290.0030.00316.36
7.3.280.0100.00716.37
7.3.270.0000.01617.40
7.3.260.0080.00816.44
7.3.250.0130.00716.47
7.3.240.0160.00216.43
7.3.230.0000.01716.45
7.3.210.0090.00916.59
7.3.200.0070.01016.19
7.3.190.0130.00716.43
7.3.180.0140.00316.23
7.3.170.0100.00616.48
7.3.160.0170.00016.48
7.3.00.0110.00416.41
7.2.330.0050.01116.50
7.2.320.0030.01416.59
7.2.310.0070.01016.82
7.2.300.0100.00716.55
7.2.290.0140.00316.51
7.2.130.0070.00716.77
7.2.120.0030.01216.64
7.2.110.0110.00416.67
7.2.100.0080.00416.94
7.2.90.0090.00316.81
7.2.80.0000.01416.72
7.2.70.0030.00616.76
7.2.60.0100.00316.82
7.2.50.0060.00916.48
7.2.40.0090.00616.64
7.2.30.0030.00916.86
7.2.20.0070.01016.82
7.2.10.0040.00816.78
7.2.00.0060.00618.02
7.1.250.0060.00615.54
7.1.240.0000.01115.54
7.1.230.0070.00715.61
7.1.220.0000.00915.63
7.1.210.0100.00015.32
7.1.200.0070.00615.83
7.1.190.0000.00815.81
7.1.180.0110.00015.50
7.1.170.0100.00315.70
7.1.160.0040.00815.53
7.1.150.0000.01115.61
7.1.140.0070.00415.48
7.1.130.0040.00815.51
7.1.120.0040.00815.68
7.1.110.0050.00315.82
7.1.100.0020.01016.74
7.1.90.0060.00615.48
7.1.80.0060.00615.81
7.1.70.0040.00516.54
7.1.60.0060.01117.51
7.1.50.0020.01216.35
7.1.40.0030.00915.65
7.1.30.0060.00315.44
7.1.20.0110.00015.70
7.1.10.0000.01015.46
7.1.00.0020.04319.12
7.0.330.0000.00915.29
7.0.320.0060.00615.27
7.0.310.0030.00715.56
7.0.300.0040.00415.34
7.0.290.0070.00315.43
7.0.280.0060.00615.22
7.0.270.0030.00715.26
7.0.260.0030.01015.20
7.0.250.0030.01014.98
7.0.240.0000.01115.30
7.0.230.0070.00715.28
7.0.220.0040.00715.32
7.0.210.0070.00715.02
7.0.200.0100.00915.12
7.0.190.0060.00315.39
7.0.180.0060.00615.35
7.0.170.0080.00415.29
7.0.160.0030.00615.51
7.0.150.0030.00815.38
7.0.140.0060.00315.30
7.0.130.0090.00315.25
7.0.120.0060.00615.47
7.0.110.0080.00315.11
7.0.100.0030.00715.39
7.0.90.0050.00515.49
7.0.80.0000.01315.12
7.0.70.0030.01015.34
7.0.60.0030.02517.71
7.0.50.0100.04416.64
7.0.40.0020.04816.79
7.0.30.0170.04316.89
7.0.20.0120.02516.74
7.0.10.0080.02316.78
7.0.00.0070.04316.74
5.6.380.0070.00414.40
5.6.370.0000.01414.45
5.6.360.0040.00814.29
5.6.350.0110.00314.39
5.6.340.0000.01214.67
5.6.330.0090.00314.59
5.6.320.0090.00614.66
5.6.310.0060.00614.64
5.6.300.0040.01114.50
5.6.290.0030.00914.45
5.6.280.0070.01517.95
5.6.270.0060.00614.59
5.6.260.0060.00614.38
5.6.250.0110.00614.76
5.6.240.0030.00614.45
5.6.230.0030.01014.27
5.6.220.0060.00814.15
5.6.210.0130.03617.62
5.6.200.0050.02416.30
5.6.190.0020.03017.24
5.6.180.0190.02617.47
5.6.170.0170.03917.34
5.6.160.0070.02717.45
5.6.150.0060.04516.19
5.6.140.0060.04216.17
5.6.130.0050.02316.18
5.6.120.0100.03717.53
5.6.110.0080.03717.79
5.6.100.0080.03117.78
5.6.90.0050.02917.87
5.6.80.0090.03917.44
5.6.70.0060.00614.11
5.6.60.0050.00314.30
5.6.50.0050.00514.52
5.6.40.0090.00014.07
5.6.30.0040.00814.32
5.6.20.0070.00314.30
5.6.10.0000.01514.26
5.6.00.0070.00714.17
5.5.380.0000.00711.39
5.5.370.0080.00011.66
5.5.360.0030.00711.56
5.5.350.0090.04615.83
5.5.340.0050.02614.57
5.5.330.0080.03815.77
5.5.320.0000.02715.78
5.5.310.0130.02315.72
5.5.300.0000.02314.58
5.5.290.0080.03814.62
5.5.280.0090.04016.08
5.5.270.0040.03916.03
5.5.260.0080.04016.07
5.5.250.0090.04215.91
5.5.240.2100.02015.81
5.5.230.0000.00811.43
5.5.220.0030.00311.18
5.5.210.0040.00411.21
5.5.200.0060.00611.40
5.5.190.0040.00411.18
5.5.180.0040.00411.28
5.5.170.0070.00011.18
5.5.160.0040.00411.26
5.5.150.0070.00011.18
5.5.140.0080.00011.18
5.5.130.0000.00811.33
5.5.120.0040.00411.34
5.5.110.0000.00911.36
5.5.100.0050.00311.24
5.5.90.0080.00411.21
5.5.80.0040.00411.22
5.5.70.0000.00811.18
5.5.60.0070.00011.33
5.5.50.0050.00511.18
5.5.40.0030.00811.35
5.5.30.0000.00811.18
5.5.20.0040.00411.30
5.5.10.0040.00411.40
5.5.00.0070.00011.18

preferences:
43.21 ms | 400 KiB | 5 Q