3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Outside { protected $data; public function __construct($data) { $this->data = $data; } public function getArrayAccess() { return new class($this->data) extends Outside implements ArrayAccess { public function offsetGet($offset) { return $this->data[$offset]; } public function offsetSet($offset, $data) { return ($this->data[$offset] = $data); } public function offsetUnset($offset) { unset($this->data[$offset]); } public function offsetExists($offset) { return isset($this->data[$offset]); } }; } } $outer = new Outside('testingdata'); $test = $outer->getArrayAccess()->offsetGet(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.0060.01518.40
8.3.50.0070.00716.18
8.3.40.0040.01118.79
8.3.30.0090.00618.79
8.3.20.0040.00420.21
8.3.10.0040.00421.86
8.3.00.0090.00020.16
8.2.180.0090.01316.88
8.2.170.0140.00022.96
8.2.160.0110.00720.57
8.2.150.0050.00225.66
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0100.00017.75
8.2.110.0080.00320.35
8.2.100.0040.00817.88
8.2.90.0080.00019.17
8.2.80.0000.00817.97
8.2.70.0080.00017.61
8.2.60.0030.00617.93
8.2.50.0080.00018.07
8.2.40.0080.00019.38
8.2.30.0050.00320.61
8.2.20.0000.00817.64
8.2.10.0000.00718.04
8.2.00.0040.00418.00
8.1.280.0040.01125.92
8.1.270.0100.01023.96
8.1.260.0050.00326.35
8.1.250.0050.00228.09
8.1.240.0090.00022.05
8.1.230.0030.01017.42
8.1.220.0000.00817.77
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.39
8.1.160.0040.00422.09
8.1.150.0070.00018.85
8.1.140.0080.00017.53
8.1.130.0000.00717.71
8.1.120.0030.00517.37
8.1.110.0030.00517.46
8.1.100.0000.00717.47
8.1.90.0040.00417.40
8.1.80.0000.00717.48
8.1.70.0000.00717.50
8.1.60.0040.00417.50
8.1.50.0000.00917.55
8.1.40.0040.00417.41
8.1.30.0030.00517.67
8.1.20.0040.00417.66
8.1.10.0020.00517.48
8.1.00.0000.00817.42
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.33
8.0.270.0040.00417.17
8.0.260.0030.00317.23
8.0.250.0070.00017.02
8.0.240.0000.00717.02
8.0.230.0000.00717.00
8.0.220.0040.00416.84
8.0.210.0000.00716.73
8.0.200.0040.00316.89
8.0.190.0050.00316.86
8.0.180.0030.00516.88
8.0.170.0020.00516.94
8.0.160.0000.00716.93
8.0.150.0000.00716.82
8.0.140.0060.00316.77
8.0.130.0030.00313.41
8.0.120.0040.00416.82
8.0.110.0050.00216.96
8.0.100.0040.00416.96
8.0.90.0040.00416.68
8.0.80.0060.01316.90
8.0.70.0000.00816.96
8.0.60.0000.00816.80
8.0.50.0000.00816.79
8.0.30.0100.00916.99
8.0.20.0080.01017.40
8.0.10.0040.00417.08
8.0.00.0130.00616.78
7.4.330.0050.00015.08
7.4.320.0000.00716.57
7.4.300.0030.00316.59
7.4.290.0030.00316.61
7.4.280.0060.00316.51
7.4.270.0000.00716.44
7.4.260.0030.00316.51
7.4.250.0070.00016.47
7.4.240.0040.00416.55
7.4.230.0030.00316.69
7.4.220.0110.00816.67
7.4.210.0070.01016.67
7.4.200.0030.00316.70
7.4.160.0090.00616.39
7.4.150.0000.01717.40
7.4.140.0140.00817.86
7.4.130.0100.00716.67
7.4.120.0080.00916.61
7.4.110.0030.01316.54
7.4.100.0060.01216.58
7.4.90.0070.01016.52
7.4.80.0130.00719.39
7.4.70.0070.01016.56
7.4.60.0030.01316.67
7.4.50.0050.00316.68
7.4.40.0130.00316.42
7.4.30.0060.01316.45
7.4.00.0040.01114.97
7.3.330.0000.00513.32
7.3.320.0020.00213.21
7.3.310.0070.00016.23
7.3.300.0030.00316.30
7.3.290.0100.00516.29
7.3.280.0040.00916.30
7.3.270.0080.00817.40
7.3.260.0000.01716.44
7.3.250.0120.00716.30
7.3.240.0160.00916.36
7.3.230.0120.00616.39
7.3.210.0100.00716.27
7.3.200.0110.00616.48
7.3.190.0090.00916.36
7.3.180.0090.00616.53
7.3.170.0080.00816.50
7.3.160.0150.00316.37
7.3.120.0110.00714.88
7.3.110.0080.00914.78
7.3.100.0050.00915.01
7.3.90.0040.00914.80
7.3.80.0060.00614.79
7.3.70.0070.00714.72
7.3.60.0050.01014.92
7.3.50.0050.00814.77
7.3.40.0040.01014.77
7.3.30.0090.00514.74
7.3.20.0020.01116.54
7.3.10.0040.00916.64
7.3.00.0030.00816.80
7.2.330.0100.00716.70
7.2.320.0030.01616.61
7.2.310.0040.01516.68
7.2.300.0100.00716.73
7.2.290.0060.01316.51
7.2.250.0040.01215.04
7.2.240.0110.00814.79
7.2.230.0030.01015.17
7.2.220.0060.00814.99
7.2.210.0060.00915.18
7.2.200.0040.00615.12
7.2.190.0050.00615.04
7.2.180.0100.00614.97
7.2.170.0080.00814.99
7.2.60.0070.01016.80
7.2.00.0030.01319.47
7.1.330.0050.01015.76
7.1.320.0100.00315.76
7.1.310.0020.01215.69
7.1.300.0070.00315.78
7.1.290.0090.00515.80
7.1.280.0050.01015.84
7.1.270.0050.00915.71
7.1.260.0030.00915.88
7.1.200.0040.00815.61
7.1.100.0000.01518.38
7.1.70.0040.00417.25
7.1.60.0070.01519.29
7.1.50.0180.01434.77
7.1.00.0030.07722.54
7.0.200.0000.01216.68
7.0.100.0000.08720.04
7.0.90.0070.04719.98
7.0.80.0100.07319.85
7.0.70.0100.07719.87
7.0.60.0200.07019.99
7.0.50.0100.07720.31
7.0.40.0070.08020.09
7.0.30.0230.04720.05
7.0.20.0100.07720.04
7.0.10.0170.07320.04
7.0.00.0030.08320.04
5.6.280.0070.06720.87
5.6.250.0030.08320.63
5.6.240.0000.08720.58
5.6.230.0170.06720.63
5.6.220.0070.07720.59
5.6.210.0070.07020.63
5.6.200.0070.07321.09
5.6.190.0170.06021.09
5.6.180.0070.07321.01
5.6.170.0130.07721.09
5.6.160.0100.07021.19
5.6.150.0070.06720.97
5.6.140.0030.08021.02
5.6.130.0000.09321.01
5.6.120.0070.05321.09
5.6.110.0100.04720.95
5.6.100.0130.05720.94
5.6.90.0170.05321.09
5.6.80.0030.04720.46
5.6.70.0130.06720.32
5.6.60.0100.07020.39
5.6.50.0030.08320.32
5.6.40.0130.07320.50
5.6.30.0100.04020.41
5.6.20.0030.05020.42
5.6.10.0030.04720.30
5.6.00.0100.07720.36
5.5.380.0070.08320.45
5.5.370.0070.08020.51
5.5.360.0100.04720.45
5.5.350.0100.06720.43
5.5.340.0130.07020.89
5.5.330.0070.05320.84
5.5.320.0100.07720.83
5.5.310.0170.06020.64
5.5.300.0170.07720.93
5.5.290.0070.08020.88
5.5.280.0000.07720.73
5.5.270.0030.08320.89
5.5.260.0070.05720.90
5.5.250.0130.07020.73
5.5.240.0030.04720.25
5.5.230.0270.03020.25
5.5.220.0070.08020.24
5.5.210.0070.07720.19
5.5.200.0030.08320.19
5.5.190.0030.04320.15
5.5.180.0100.07020.13
5.5.160.0170.06720.00
5.5.150.0170.04320.15
5.5.140.0100.07320.18
5.5.130.0070.06320.18
5.5.120.0070.06020.21
5.5.110.0030.08320.18
5.5.100.0030.08320.08
5.5.90.0100.06720.10
5.5.80.0070.05020.16
5.5.70.0100.07320.09
5.5.60.0070.04720.06
5.5.50.0070.07020.16
5.5.40.0070.08020.00
5.5.30.0030.08020.15
5.5.20.0070.04720.05
5.5.10.0230.06320.05
5.5.00.0100.04320.04
5.4.450.0030.05719.23
5.4.440.0070.08319.51
5.4.430.0100.08319.45
5.4.420.0100.04319.23
5.4.410.0170.06719.24
5.4.400.0100.08018.87
5.4.390.0130.06718.91
5.4.380.0030.07319.09
5.4.370.0100.06719.22
5.4.360.0100.07019.21
5.4.350.0100.07718.85
5.4.340.0070.06719.16
5.4.320.0100.04318.90
5.4.310.0000.08319.05
5.4.300.0100.05019.09
5.4.290.0070.07019.12
5.4.280.0030.07319.12
5.4.270.0030.06318.87
5.4.260.0100.04019.13
5.4.250.0100.04019.12
5.4.240.0070.04719.11
5.4.230.0100.03319.04
5.4.220.0100.07319.22
5.4.210.0070.04319.15
5.4.200.0030.08718.89
5.4.190.0100.06019.20
5.4.180.0030.07719.11
5.4.170.0030.06019.04
5.4.160.0100.06719.03
5.4.150.0030.05019.03
5.4.140.0070.07016.45
5.4.130.0100.06316.44
5.4.120.0070.07316.46
5.4.110.0100.07316.51
5.4.100.0100.07716.43
5.4.90.0170.06016.27
5.4.80.0100.07016.30
5.4.70.0000.06316.41
5.4.60.0030.07316.42
5.4.50.0130.03716.41
5.4.40.0030.06316.47
5.4.30.0170.06316.36
5.4.20.0030.04716.36
5.4.10.0070.04316.39
5.4.00.0030.06315.78

preferences:
56.66 ms | 400 KiB | 5 Q