3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test implements ArrayAccess { public $v; function __construct() { $this->v = array( 'a' => array('b' => 'c'), 'd' => array('e' => 'f'), 'g' => array('h' => 'i') ); } function offsetExists($offset) { return isset($this->v); } function &offsetGet($offset) { return isset($this->v[$offset]) ? $this->v[$offset] : ($null =null); } function offsetSet($offset, $value) { if (is_null($offset)) { $this->v[] = $value; } else { $this->v[$offset] = $value; } } function offsetUnset($offset) { unset($this->v[$offset]); } } $test = new test(); $test['a']['b'] = 'zzz'; print_r($test->v);

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.00318.68
8.3.50.0070.01121.32
8.3.40.0110.00718.96
8.3.30.0110.00418.97
8.3.20.0070.00020.34
8.3.10.0040.00421.93
8.3.00.0040.00422.46
8.2.180.0120.00916.88
8.2.170.0070.01022.96
8.2.160.0130.00320.11
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0060.00317.88
8.2.110.0100.00022.24
8.2.100.0070.00417.75
8.2.90.0080.00019.26
8.2.80.0060.00317.97
8.2.70.0030.00617.38
8.2.60.0000.00818.03
8.2.50.0060.00318.07
8.2.40.0030.00619.28
8.2.30.0000.01118.09
8.2.20.0000.00717.68
8.2.10.0050.00318.10
8.2.00.0040.00418.23
8.1.280.0030.01225.92
8.1.270.0040.00420.33
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00619.11
8.1.230.0080.00317.48
8.1.220.0060.00317.91
8.1.210.0000.00818.77
8.1.200.0080.00317.35
8.1.190.0000.00917.35
8.1.180.0000.00718.10
8.1.170.0000.00818.39
8.1.160.0000.00823.71
8.1.150.0000.00818.96
8.1.140.0000.00917.37
8.1.130.0080.00017.64
8.1.120.0070.00017.39
8.1.110.0040.00417.36
8.1.100.0000.00817.47
8.1.90.0020.00517.40
8.1.80.0040.00417.54
8.1.70.0070.00017.48
8.1.60.0030.00517.59
8.1.50.0030.00517.42
8.1.40.0000.00817.53
8.1.30.0040.00717.67
8.1.20.0070.00017.52
8.1.10.0040.00417.49
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0000.00718.52
8.0.270.0070.00017.18
8.0.260.0030.00317.26
8.0.250.0000.00816.93
8.0.240.0000.00816.92
8.0.230.0000.00716.98
8.0.220.0070.00016.97
8.0.210.0070.00016.86
8.0.200.0000.00617.02
8.0.190.0070.00016.92
8.0.180.0080.00016.94
8.0.170.0000.00716.99
8.0.160.0040.00416.98
8.0.150.0040.00416.89
8.0.140.0000.00716.89
8.0.130.0060.00013.43
8.0.120.0030.00516.82
8.0.110.0040.00416.86
8.0.100.0070.00016.76
8.0.90.0040.00417.08
8.0.80.0060.00816.92
8.0.70.0000.00716.96
8.0.60.0000.00716.96
8.0.50.0080.00017.06
8.0.30.0100.00817.02
8.0.20.0100.01017.40
8.0.10.0000.00816.94
8.0.00.0080.01016.81
7.4.330.0030.00315.08
7.4.320.0030.00316.43
7.4.300.0060.00016.61
7.4.290.0050.00316.61
7.4.280.0000.00716.60
7.4.270.0030.00316.64
7.4.260.0040.00416.51
7.4.250.0050.00316.49
7.4.240.0020.00616.42
7.4.230.0040.00416.40
7.4.220.0140.01116.59
7.4.210.0090.00916.62
7.4.200.0000.00716.45
7.4.160.0100.00716.43
7.4.150.0060.01217.40
7.4.140.0170.00817.86
7.4.130.0090.00816.48
7.4.120.0100.00716.54
7.4.110.0100.00716.58
7.4.100.0100.00716.57
7.4.90.0030.01316.67
7.4.80.0130.00619.39
7.4.70.0080.00816.48
7.4.60.0100.00716.53
7.4.50.0040.00416.59
7.4.40.0090.00916.62
7.4.30.0060.01016.68
7.4.00.0060.01115.12
7.3.330.0060.00013.46
7.3.320.0050.00013.35
7.3.310.0040.00416.41
7.3.300.0040.00416.39
7.3.290.0070.01016.40
7.3.280.0070.01416.42
7.3.270.0140.00517.40
7.3.260.0030.01916.39
7.3.250.0120.01116.40
7.3.240.0090.01116.42
7.3.230.0000.01716.39
7.3.210.0110.00616.49
7.3.200.0090.00919.39
7.3.190.0030.01316.60
7.3.180.0080.01116.34
7.3.170.0100.00616.36
7.3.160.0070.01016.54
7.3.120.0100.00615.11
7.3.110.0070.01114.68
7.3.100.0080.00815.02
7.3.90.0100.00015.11
7.3.80.0000.01014.86
7.3.70.0100.00414.74
7.3.60.0080.00814.61
7.3.50.0000.01414.93
7.3.40.0090.00414.93
7.3.30.0050.00514.93
7.3.20.0060.00916.68
7.3.10.0070.00716.70
7.3.00.0040.00816.80
7.2.330.0040.01616.39
7.2.320.0140.00916.87
7.2.310.0100.01016.82
7.2.300.0100.00716.54
7.2.290.0060.01016.51
7.2.250.0000.01414.98
7.2.240.0070.01015.02
7.2.230.0030.01414.84
7.2.220.0030.01414.80
7.2.210.0100.00614.98
7.2.200.0040.01115.22
7.2.190.0060.00915.10
7.2.180.0070.00714.75
7.2.170.0070.00715.28
7.2.80.0060.00616.55
7.2.60.0090.00316.79
7.2.00.0210.00719.02
7.1.330.0120.00315.94
7.1.320.0000.01215.78
7.1.310.0060.00615.80
7.1.300.0070.00415.55
7.1.290.0030.00715.81
7.1.280.0060.00315.74
7.1.270.0030.00615.68
7.1.260.0030.00815.89
7.1.200.0030.00915.82
7.1.100.0100.01018.14
7.1.70.0040.00717.19
7.1.60.0140.01020.03
7.1.50.0060.00617.05
7.1.00.0000.08022.45
7.0.200.0040.00416.79
7.0.60.0070.06719.98
7.0.50.0000.04317.88
7.0.40.0070.08320.23
7.0.30.0400.07320.23
7.0.20.0330.07320.19
7.0.10.0100.08320.04
7.0.00.0030.08720.12
5.6.280.0030.06020.93
5.6.210.0100.08320.76
5.6.200.0070.07018.19
5.6.190.0100.09320.45
5.6.180.0200.06720.48
5.6.170.0270.07320.46
5.6.160.0130.07720.54
5.6.150.0070.06018.17
5.6.140.0070.08018.21
5.6.130.0070.05718.14
5.6.120.0030.04321.06
5.6.110.0100.08021.02
5.6.100.0000.04321.14
5.6.90.0070.04321.08
5.6.80.0030.07020.41
5.6.70.4330.03720.44
5.5.350.0400.06320.34
5.5.340.0030.03717.94
5.5.330.0100.06320.42
5.5.320.0330.07320.34
5.5.310.0200.06320.34
5.5.300.0100.08017.98
5.5.290.0130.06717.97
5.5.280.0000.04720.90
5.5.270.0170.04720.96
5.5.260.0070.08720.68
5.5.250.0030.08320.80
5.5.240.3070.02720.05
5.4.450.0700.05719.65
5.4.440.0830.05319.33
5.4.430.0970.06319.38
5.4.420.0700.05019.47
5.4.410.0600.06019.21
5.4.400.0730.05019.00
5.4.390.0830.06719.26
5.4.380.0730.06719.37
5.4.370.0670.05319.05
5.4.360.0700.05319.06
5.4.350.0700.05719.06
5.4.340.0600.05318.84
5.4.320.1030.06019.23
5.4.310.0900.04719.15
5.4.300.0700.06319.15
5.4.290.0630.06019.36
5.4.280.0830.06019.14
5.4.270.0630.05319.26
5.4.260.0570.06318.87
5.4.250.0630.04718.83
5.4.240.0270.04319.29
5.4.230.0070.06019.12
5.4.220.0200.06319.21
5.4.210.0530.05019.01
5.4.200.0570.06016.94
5.4.190.0030.07018.95
5.4.180.0270.06319.07
5.4.170.0670.06319.18
5.4.160.0400.06019.14
5.4.150.0130.05718.95
5.4.140.0470.05716.34
5.4.130.0530.05716.40
5.4.120.0670.05016.72
5.4.110.0730.04316.33
5.4.100.0930.05716.55
5.4.90.0570.05716.39
5.4.80.0630.05716.49
5.4.70.0700.05316.51
5.4.60.0000.03716.54
5.4.50.0030.07716.50
5.4.40.0100.04016.53
5.4.30.0200.05716.42
5.4.20.0330.04316.17

preferences:
122.44 ms | 401 KiB | 5 Q