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->var[$offset]) ? $this->var[$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.0100.01418.64
8.3.50.0070.00716.50
8.3.40.0100.00718.70
8.3.30.0080.00618.63
8.3.20.0040.00420.22
8.3.10.0050.00221.90
8.3.00.0040.00422.43
8.2.180.0150.00416.50
8.2.170.0090.00622.96
8.2.160.0030.01020.37
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00826.16
8.2.120.0030.00617.75
8.2.110.0030.00721.03
8.2.100.0040.00717.91
8.2.90.0000.00819.26
8.2.80.0050.00317.97
8.2.70.0060.00317.63
8.2.60.0050.00517.93
8.2.50.0030.00618.07
8.2.40.0000.01119.30
8.2.30.0070.00318.18
8.2.20.0040.00417.68
8.2.10.0000.00718.12
8.2.00.0000.00818.00
8.1.280.0090.00925.92
8.1.270.0050.00320.46
8.1.260.0000.00826.35
8.1.250.0030.00628.09
8.1.240.0060.00319.23
8.1.230.0070.00421.04
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0040.00417.13
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0050.00318.59
8.1.160.0030.00623.74
8.1.150.0000.00718.94
8.1.140.0030.00517.38
8.1.130.0000.00717.71
8.1.120.0000.00717.48
8.1.110.0000.00817.46
8.1.100.0030.00517.50
8.1.90.0000.00817.39
8.1.80.0030.00517.43
8.1.70.0000.00717.32
8.1.60.0090.00017.64
8.1.50.0040.00417.44
8.1.40.0000.00817.41
8.1.30.0070.00317.65
8.1.20.0050.00317.67
8.1.10.0040.00417.59
8.1.00.0000.00717.41
8.0.300.0000.00718.77
8.0.290.0070.00016.88
8.0.280.0000.00718.56
8.0.270.0070.00017.17
8.0.260.0060.00017.33
8.0.250.0040.00417.05
8.0.240.0070.00016.90
8.0.230.0030.00316.99
8.0.220.0000.00717.00
8.0.210.0040.00416.91
8.0.200.0000.00616.91
8.0.190.0050.00316.99
8.0.180.0060.00317.02
8.0.170.0000.00717.00
8.0.160.0000.00817.08
8.0.150.0070.00016.90
8.0.140.0040.00416.91
8.0.130.0030.00313.36
8.0.120.0000.00816.93
8.0.110.0030.00516.79
8.0.100.0040.00416.80
8.0.90.0040.00416.83
8.0.80.0110.00417.02
8.0.70.0000.00717.01
8.0.60.0000.00716.86
8.0.50.0030.00517.00
8.0.30.0060.01216.91
8.0.20.0100.01317.40
8.0.10.0050.00217.15
8.0.00.0130.00416.70
7.4.330.0050.00015.14
7.4.320.0030.00316.49
7.4.300.0020.00516.46
7.4.290.0070.00316.62
7.4.280.0000.00716.65
7.4.270.0000.00716.43
7.4.260.0030.00316.56
7.4.250.0080.00016.59
7.4.240.0040.00416.64
7.4.230.0030.00516.69
7.4.220.0130.00616.71
7.4.210.0080.00816.71
7.4.200.0040.00416.31
7.4.160.0040.01216.43
7.4.150.0100.00717.40
7.4.140.0130.00617.86
7.4.130.0120.00716.49
7.4.120.0130.00616.60
7.4.110.0060.00916.45
7.4.100.0160.00316.51
7.4.90.0070.01016.73
7.4.80.0120.00619.39
7.4.70.0100.00616.56
7.4.60.0060.01016.59
7.4.50.0000.00416.38
7.4.40.0060.01016.65
7.4.30.0100.00716.65
7.4.00.0140.00015.19
7.3.330.0070.00013.29
7.3.320.0030.00313.29
7.3.310.0030.00516.29
7.3.300.0040.00416.29
7.3.290.0090.01016.41
7.3.280.0070.01116.37
7.3.270.0140.00617.40
7.3.260.0120.00616.35
7.3.250.0140.00616.38
7.3.240.0100.01016.37
7.3.230.0100.00716.40
7.3.210.0110.01116.49
7.3.200.0120.00916.30
7.3.190.0100.00716.52
7.3.180.0060.00916.45
7.3.170.0110.00716.39
7.3.160.0060.01216.32
7.3.10.0130.00316.63
7.3.00.0030.00916.78
7.2.330.0080.01116.76
7.2.320.0030.01316.76
7.2.310.0030.01316.45
7.2.300.0100.00616.81
7.2.290.0120.00616.38
7.2.130.0110.00416.91
7.2.120.0100.00316.85
7.2.110.0060.00916.95
7.2.100.0030.01017.08
7.2.90.0090.00016.75
7.2.80.0080.00417.20
7.2.70.0000.01116.89
7.2.60.0060.00817.02
7.2.50.0030.00717.16
7.2.40.0000.01716.93
7.2.30.0080.00816.72
7.2.20.0070.00316.98
7.2.10.0110.00316.95
7.2.00.0100.00918.01
7.1.250.0070.00415.75
7.1.200.0040.00815.81
7.1.100.0100.01018.33
7.1.70.0080.00817.10
7.1.60.0090.01620.03
7.1.50.0030.00716.87
7.1.00.0070.07322.32
7.0.200.0040.00416.85
7.0.60.0130.07020.05
7.0.50.0030.08317.90
7.0.40.0070.08320.24
7.0.30.0230.04320.09
7.0.20.0300.08020.06
7.0.10.0030.04320.05
7.0.00.0000.09320.07
5.6.280.0030.05021.04
5.6.210.0070.08720.61
5.6.200.0130.03718.29
5.6.190.0000.08720.62
5.6.180.0200.08020.33
5.6.170.0200.05020.54
5.6.160.0170.06320.39
5.6.150.0130.06718.21
5.6.140.0070.03718.29
5.6.130.0130.03718.15
5.6.120.0070.04021.15
5.6.110.0070.04720.99
5.6.100.0100.08020.96
5.6.90.0130.08320.89
5.6.80.0100.07320.49
5.6.70.4570.03720.50
5.5.350.0370.05720.36
5.5.340.0170.07317.98
5.5.330.0100.07020.40
5.5.320.0330.07320.34
5.5.310.0230.05020.25
5.5.300.0000.05018.04
5.5.290.0070.05017.95
5.5.280.0100.08020.78
5.5.270.0070.08320.69
5.5.260.0070.07020.97
5.5.250.0100.05020.68
5.5.240.4200.03720.36
5.4.450.0670.06319.49
5.4.440.0570.06719.54
5.4.430.0670.05319.46
5.4.420.0770.05319.16
5.4.410.0630.05319.43
5.4.400.0770.04719.23
5.4.390.0670.07019.23
5.4.380.0670.05319.06
5.4.370.0870.04019.28
5.4.360.0830.04719.02
5.4.350.1000.07019.26
5.4.340.0730.05719.28
5.4.320.0900.04319.26
5.4.310.0800.04719.14
5.4.300.0700.05719.30
5.4.290.0700.05719.05
5.4.280.0670.05719.30
5.4.270.1000.06019.27
5.4.260.0900.05019.12
5.4.250.0670.05719.21
5.4.240.0670.05018.83
5.4.230.0830.06019.21
5.4.220.0730.06019.36
5.4.210.0630.05319.02
5.4.200.0670.04716.93
5.4.190.0770.05019.10
5.4.180.0700.05318.96
5.4.170.0630.05319.02
5.4.160.0670.05018.96
5.4.150.0970.06319.01
5.4.140.0670.05716.32
5.4.130.0700.04716.56
5.4.120.0670.04716.54
5.4.110.0770.04716.51
5.4.100.0600.05716.40
5.4.90.1000.03016.50
5.4.80.0800.04316.48
5.4.70.0630.05716.32
5.4.60.0070.06716.27
5.4.50.0070.03716.38
5.4.40.0170.03316.43
5.4.30.0400.05716.50
5.4.20.0330.06316.48

preferences:
57.24 ms | 400 KiB | 5 Q