3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Thing extends ArrayObject { public function __construct(array $data) { parent::__construct($data, self::ARRAY_AS_PROPS); } public function offsetSet($index, $value) { parent::offsetSet($index, $value); return $this; } public function &offsetGet($index) { if (!$this->offsetExists($index)) { $this[$index] = null; } return $this[$index]; } } $test = new Thing([]); $test->dynamic['key'] = ['is-set' => 'up to 7.1.3']; var_dump($test);

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.0300.01032.18
8.3.50.0460.00331.80
8.3.40.0200.01734.17
8.3.30.0300.01334.02
8.3.20.0070.01037.10
8.3.10.0090.00639.64
8.3.00.0150.00437.18
8.2.180.0370.00026.54
8.2.170.0200.00728.80
8.2.160.0170.00732.00
8.2.150.0140.00028.89
8.2.140.0110.00430.19
8.2.130.0130.00032.11
8.2.120.0100.00330.27
8.2.110.0140.00330.45
8.2.100.0210.00727.59
8.2.90.0070.00727.75
8.2.80.0180.00028.52
8.2.70.0040.01227.63
8.2.60.0110.00427.79
8.2.50.0070.00727.63
8.2.40.0120.00328.16
8.2.30.0070.00727.93
8.2.20.0060.00628.02
8.2.10.0060.00628.03
8.2.00.0090.00328.10
8.1.280.0170.02026.31
8.1.270.0070.00732.24
8.1.260.0100.00332.55
8.1.250.0150.00030.15
8.1.240.0140.00332.27
8.1.230.0170.00333.79
8.1.220.0070.00727.55
8.1.210.0070.00727.23
8.1.200.0070.00727.35
8.1.190.0130.00327.51
8.1.180.0110.00327.64
8.1.170.0150.00028.39
8.1.160.0080.00428.88
8.1.150.0110.00028.88
8.1.140.0060.00629.07
8.1.130.0060.00628.93
8.1.120.0140.00427.36
8.1.110.0100.00327.33
8.1.100.0040.00827.36
8.1.90.0090.00327.48
8.1.80.0090.00327.46
8.1.70.0080.00427.42
8.1.60.0090.00627.55
8.1.50.0000.01227.52
8.1.40.0120.00027.53
8.1.30.0090.00327.45
8.1.20.0130.00027.50
8.1.10.0060.00627.38
8.1.00.0080.00427.37
8.0.300.0100.00326.22
8.0.290.0140.00026.25
8.0.280.0040.00828.13
8.0.270.0040.00826.56
8.0.260.0040.00728.10
8.0.250.0060.00626.54
8.0.240.0110.00426.63
8.0.230.0030.00926.62
8.0.220.0030.00926.64
8.0.210.0070.00326.39
8.0.200.0080.00326.70
8.0.190.0070.00726.68
8.0.180.0090.00326.59
8.0.170.0100.00326.57
8.0.160.0090.00326.56
8.0.150.0080.00326.53
8.0.140.0120.00026.47
8.0.130.0060.00623.15
8.0.120.0090.00426.54
8.0.110.0040.00826.52
8.0.100.0030.00926.46
8.0.90.0040.00826.35
8.0.80.0170.01326.45
8.0.70.0060.00626.38
8.0.60.0060.00626.38
8.0.50.0090.00326.43
8.0.30.0190.01326.74
8.0.20.0230.01026.64
8.0.10.0120.00026.65
8.0.00.0210.01126.51
7.4.330.0090.00024.96
7.4.320.0070.00426.30
7.4.300.0030.00726.40
7.4.290.0130.00026.30
7.4.280.0130.00026.30
7.4.270.0040.00926.32
7.4.260.0140.00026.34
7.4.250.0000.01226.20
7.4.240.0040.00826.38
7.4.230.0070.00426.28
7.4.220.0040.00726.30
7.4.210.0150.00926.34
7.4.200.0090.00326.41
7.4.160.0220.00826.29
7.4.150.0190.01326.36
7.4.140.0240.01426.37
7.4.130.0190.01626.50
7.4.120.0180.02026.36
7.4.110.0190.01026.34
7.4.100.0290.01226.38
7.4.90.0250.00426.36
7.4.80.0260.00626.34
7.4.70.0170.02026.22
7.4.60.0200.01626.32
7.4.50.0040.01826.21
7.4.40.0240.00726.27
7.4.30.0230.00826.45
7.4.00.0090.00924.71
7.3.330.0030.00723.36
7.3.320.0080.00423.29
7.3.310.0040.00826.23
7.3.300.0050.00526.26
7.3.290.0200.01026.23
7.3.280.0210.01326.22
7.3.270.0330.00826.32
7.3.260.0200.01326.32
7.3.250.0200.01326.46
7.3.240.0190.01626.35
7.3.230.0110.01926.23
7.3.210.0110.01826.36
7.3.200.0200.01326.07
7.3.190.0200.00926.35
7.3.180.0200.01026.34
7.3.170.0240.01726.46
7.3.160.0140.01426.29
7.2.330.0280.00326.44
7.2.320.0170.02026.14
7.2.310.0240.00626.53
7.2.300.0290.00026.60
7.2.290.0110.01826.54
7.2.60.0070.01426.87
7.2.00.0270.00628.09
7.1.200.0040.01526.00
7.1.120.0220.00926.73
7.1.110.0220.00726.61
7.1.100.0200.00726.64
7.1.90.0250.01426.34
7.1.80.0170.02126.63
7.1.70.0180.01025.39
7.1.60.0260.01543.59
7.1.50.0350.00343.39
7.1.40.0240.02143.10
7.1.30.0210.00934.62
7.1.20.0220.01334.47
7.1.10.0040.01116.45
7.1.00.0060.01216.52

preferences:
58.89 ms | 400 KiB | 5 Q