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 parent::offsetGet($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.0100.00716.75
8.3.50.0120.00616.08
8.3.40.0110.00718.96
8.3.30.0150.00018.68
8.3.20.0050.00221.75
8.3.10.0050.00223.52
8.3.00.0020.00521.85
8.2.180.0170.00316.59
8.2.170.0080.00622.96
8.2.160.0030.01022.12
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0080.00019.82
8.2.110.0100.00021.18
8.2.100.0040.00718.03
8.2.90.0060.00317.98
8.2.80.0030.00617.97
8.2.70.0000.00817.93
8.2.60.0080.00017.93
8.2.50.0000.00818.12
8.2.40.0060.00320.59
8.2.30.0000.00719.39
8.2.20.0040.00418.13
8.2.10.0040.00418.12
8.2.00.0070.00018.01
8.1.280.0100.01025.92
8.1.270.0030.00622.05
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0080.00322.21
8.1.230.0140.00021.04
8.1.220.0080.00017.77
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0030.00517.25
8.1.180.0040.00418.10
8.1.170.0030.00518.59
8.1.160.0000.00818.87
8.1.150.0000.00818.81
8.1.140.0050.00219.02
8.1.130.0040.00417.46
8.1.120.0030.00617.39
8.1.110.0000.00717.38
8.1.100.0050.00317.36
8.1.90.0030.00517.48
8.1.80.0040.00417.39
8.1.70.0070.00017.46
8.1.60.0030.00617.57
8.1.50.0040.00417.50
8.1.40.0050.00317.57
8.1.30.0050.00317.62
8.1.20.0030.00617.55
8.1.10.0050.00217.48
8.1.00.0060.00317.46
8.0.300.0040.00419.78
8.0.290.0040.00416.75
8.0.280.0070.00018.37
8.0.270.0040.00417.16
8.0.260.0000.00716.77
8.0.250.0000.00817.09
8.0.240.0030.00617.00
8.0.230.0070.00016.95
8.0.220.0040.00416.91
8.0.210.0000.00716.81
8.0.200.0030.00316.88
8.0.190.0040.00416.96
8.0.180.0000.00716.96
8.0.170.0050.00317.00
8.0.160.0050.00316.91
8.0.150.0000.00716.94
8.0.140.0040.00416.91
8.0.130.0030.00313.37
8.0.120.0040.00416.93
8.0.110.0050.00216.88
8.0.100.0050.00216.86
8.0.90.0040.00416.98
8.0.80.0120.01017.02
8.0.70.0000.00716.95
8.0.60.0000.00716.98
8.0.50.0040.00416.97
8.0.30.0080.01017.07
8.0.20.0100.01017.40
8.0.10.0040.00416.86
8.0.00.0110.00716.87
7.4.330.0050.00015.55
7.4.320.0030.00316.53
7.4.300.0040.00416.59
7.4.290.0030.00316.59
7.4.280.0060.00316.40
7.4.270.0000.00716.54
7.4.260.0030.00316.49
7.4.250.0040.00416.32
7.4.240.0070.00016.53
7.4.230.0000.00716.55
7.4.220.0070.00016.51
7.4.210.0100.01016.54
7.4.200.0000.00816.49
7.4.160.0110.00516.62
7.4.150.0170.00317.40
7.4.140.0100.01217.86
7.4.130.0130.01016.63
7.4.120.0100.01016.59
7.4.110.0050.01116.41
7.4.100.0120.00816.61
7.4.90.0110.00616.60
7.4.80.0130.00619.39
7.4.70.0150.00916.58
7.4.60.0130.00316.36
7.4.50.0100.00316.46
7.4.40.0090.00916.61
7.4.30.0120.00316.61
7.4.00.0030.01614.87
7.3.330.0000.00513.36
7.3.320.0000.00513.42
7.3.310.0030.00516.25
7.3.300.0030.00316.28
7.3.290.0090.01216.42
7.3.280.0090.00616.44
7.3.270.0150.01217.40
7.3.260.0070.01016.43
7.3.250.0120.00516.48
7.3.240.0100.00816.49
7.3.230.0080.00816.32
7.3.210.0100.00616.37
7.3.200.0120.00316.48
7.3.190.0090.00816.43
7.3.180.0100.00616.33
7.3.170.0100.00616.64
7.3.160.0100.00616.55
7.3.120.0070.01015.04
7.3.110.0090.00914.95
7.3.100.0060.00614.84
7.3.90.0030.01414.93
7.3.80.0060.00614.59
7.3.70.0070.00714.98
7.3.60.0030.01014.84
7.3.50.0030.01014.80
7.3.40.0120.00414.92
7.3.30.0050.00514.89
7.3.20.0080.00316.53
7.3.10.0090.00316.82
7.3.00.0080.00316.70
7.2.330.0130.00916.50
7.2.320.0120.00816.85
7.2.310.0120.00916.84
7.2.300.0150.00916.51
7.2.290.0110.00716.86
7.2.250.0120.00914.86
7.2.240.0070.01414.98
7.2.230.0060.00914.91
7.2.220.0110.00414.84
7.2.210.0110.00714.84
7.2.200.0110.00314.63
7.2.190.0040.00815.07
7.2.180.0090.00314.92
7.2.170.0070.01014.83
7.2.60.0090.00616.83
7.2.00.0070.01319.90
7.1.330.0070.01015.48
7.1.320.0040.01415.55
7.1.310.0030.00915.72
7.1.300.0000.01715.69
7.1.290.0100.00615.84
7.1.280.0030.00715.74
7.1.270.0040.00815.70
7.1.260.0040.00815.86
7.1.200.0040.01115.80
7.1.120.0090.01018.91
7.1.110.0060.00918.15
7.1.100.0110.00417.80
7.1.90.0000.01418.12
7.1.80.0060.00618.20
7.1.70.0080.00417.18
7.1.60.0150.00935.13
7.1.50.0160.00934.67
7.1.40.0200.01834.48
7.1.30.0160.02034.48
7.1.20.0180.01834.66
7.1.10.0060.01116.67
7.1.00.0050.00816.61

preferences:
63.27 ms | 400 KiB | 5 Q