3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ArrayAccessImpl implements ArrayAccess { private $container = array(); public function __construct($a) { $this->container = $a; } public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } public function offsetExists($offset) { return isset($this->container[$offset]); } public function offsetUnset($offset) { unset($this->container[$offset]); } public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } } list($a, $b) = new ArrayAccessImpl([1,2]); var_dump($a, $b);

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.0130.01318.43
8.3.50.0100.01221.99
8.3.40.0040.01118.83
8.3.30.0070.00719.23
8.3.20.0000.00720.34
8.3.10.0030.00523.53
8.3.00.0080.00019.01
8.2.180.0130.00816.38
8.2.170.0060.00918.98
8.2.160.0110.00422.96
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00419.55
8.2.110.0050.00520.89
8.2.100.0000.01217.80
8.2.90.0060.00319.77
8.2.80.0000.00820.59
8.2.70.0030.00518.05
8.2.60.0000.00818.28
8.2.50.0050.00318.10
8.2.40.0060.00319.26
8.2.30.0030.00519.21
8.2.20.0000.00817.69
8.2.10.0050.00318.15
8.2.00.0060.00317.63
8.1.280.0110.00425.92
8.1.270.0040.00418.83
8.1.260.0090.00026.35
8.1.250.0000.00728.09
8.1.240.0070.00322.02
8.1.230.0040.00722.82
8.1.220.0000.00817.76
8.1.210.0080.00019.04
8.1.200.0030.00617.36
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0050.00318.55
8.1.160.0000.00718.97
8.1.150.0040.00418.92
8.1.140.0000.00717.38
8.1.130.0000.01117.82
8.1.120.0030.00517.46
8.1.110.0040.00417.34
8.1.100.0070.00017.45
8.1.90.0030.00517.46
8.1.80.0040.00417.44
8.1.70.0030.00317.46
8.1.60.0040.00417.57
8.1.50.0030.00517.44
8.1.40.0000.00817.53
8.1.30.0030.00517.55
8.1.20.0000.00717.64
8.1.10.0040.00417.65
8.1.00.0000.00717.38
8.0.300.0000.00720.04
8.0.290.0080.00016.75
8.0.280.0000.00718.37
8.0.270.0070.00017.16
8.0.260.0030.00317.26
8.0.250.0000.00716.90
8.0.240.0030.00317.00
8.0.230.0040.00416.94
8.0.220.0000.00716.90
8.0.210.0030.00316.82
8.0.200.0020.00517.02
8.0.190.0070.00017.02
8.0.180.0040.00416.82
8.0.170.0000.00816.81
8.0.160.0040.00416.75
8.0.150.0040.00416.94
8.0.140.0000.00816.89
8.0.130.0000.00613.33
8.0.120.0040.00416.91
8.0.110.0050.00216.89
8.0.100.0000.00716.71
8.0.90.0070.00016.89
8.0.80.0070.01016.89
8.0.70.0000.00716.94
8.0.60.0070.00016.80
8.0.50.0000.00816.80
8.0.30.0080.01116.99
8.0.20.0090.01117.40
8.0.10.0040.00417.00
8.0.00.0050.01316.91
7.4.330.0020.00215.03
7.4.320.0070.00016.53
7.4.300.0030.00316.52
7.4.290.0000.00716.61
7.4.280.0040.00416.41
7.4.270.0000.00716.62
7.4.260.0030.00716.59
7.4.250.0030.00516.46
7.4.240.0020.00516.61
7.4.230.0030.00316.40
7.4.220.0090.00916.50
7.4.210.0000.01516.57
7.4.200.0000.00716.61
7.4.160.0110.00516.59
7.4.150.0060.01217.40
7.4.140.0030.01417.86
7.4.130.0060.01116.60
7.4.120.0050.01316.56
7.4.110.0090.01416.43
7.4.100.0090.00916.56
7.4.90.0130.00316.55
7.4.80.0090.01219.39
7.4.70.0110.00816.63
7.4.60.0080.00916.52
7.4.50.0080.00016.62
7.4.40.0120.00916.55
7.4.30.0030.01616.54
7.4.00.0050.01215.00
7.3.330.0000.00613.39
7.3.320.0050.00013.14
7.3.310.0000.00816.25
7.3.300.0030.00316.36
7.3.290.0070.00716.34
7.3.280.0070.01116.38
7.3.270.0090.00917.40
7.3.260.0120.00916.51
7.3.250.0070.01016.44
7.3.240.0110.01116.48
7.3.230.0110.01116.56
7.3.210.0070.01016.27
7.3.200.0120.01219.39
7.3.190.0110.00716.40
7.3.180.0070.01016.50
7.3.170.0070.01416.48
7.3.160.0060.01016.45
7.3.120.0100.00314.78
7.3.110.0030.01314.98
7.3.100.0070.01015.02
7.3.90.0110.00414.59
7.3.80.0070.00314.62
7.3.70.0040.01114.97
7.3.60.0030.01014.72
7.3.50.0030.01514.79
7.3.40.0090.00014.90
7.3.30.0080.00814.95
7.3.20.0000.01016.68
7.3.10.0040.00716.75
7.3.00.0110.00416.54
7.2.330.0100.01016.43
7.2.320.0120.00616.88
7.2.310.0030.01316.53
7.2.300.0100.00716.64
7.2.290.0190.00416.50
7.2.250.0060.00615.21
7.2.240.0110.00714.97
7.2.230.0000.01714.79
7.2.220.0100.00615.22
7.2.210.0070.00715.20
7.2.200.0120.00315.23
7.2.190.0100.00015.18
7.2.180.0030.00715.26
7.2.170.0040.01215.05
7.2.60.0060.00616.93
7.1.330.0080.00815.96
7.1.320.0000.01415.93
7.1.310.0040.01115.69
7.1.300.0130.00015.92
7.1.290.0070.00715.94
7.1.280.0000.01416.02
7.1.270.0030.01015.64
7.1.260.0080.00415.82
7.1.200.0060.00315.54
7.1.70.0040.01217.26
7.1.60.0130.01319.22
7.1.50.0060.01216.57
7.1.00.0030.07722.42
7.0.200.0020.00516.51
7.0.140.0000.07722.07
7.0.60.0200.08020.04
7.0.50.0070.08017.69
7.0.40.0070.05020.15
7.0.30.0170.04020.06
7.0.20.0130.06720.10
7.0.10.0100.04020.23
7.0.00.0130.07320.25
5.6.280.0100.06321.05
5.6.210.0070.05020.77
5.6.200.0030.08318.20
5.6.190.0130.04720.61
5.6.180.0300.05720.73
5.6.170.0300.04020.54
5.6.160.0030.04020.54
5.6.150.0070.07718.14
5.6.140.0000.04718.18
5.6.130.0070.04018.18
5.6.120.0070.04020.99
5.6.110.0070.08721.04
5.6.100.0030.05721.02
5.6.90.0130.08321.08
5.6.80.0100.04020.37
5.5.350.4230.04720.50
5.5.340.0130.05717.95
5.5.330.0000.04720.29
5.5.320.0500.08020.32
5.5.310.0370.07720.32
5.5.300.0100.08017.97
5.5.290.0030.05017.95
5.5.280.0130.08020.99
5.5.270.0030.06020.77
5.5.260.0030.07020.88
5.5.250.0070.07020.48
5.5.240.0070.07320.26
5.4.450.3530.04019.39
5.4.440.0030.05719.50
5.4.430.1400.06319.46
5.4.420.3770.04319.44
5.4.410.0000.06019.34
5.4.400.4370.03719.13
5.4.390.3470.04019.15
5.4.380.4000.03718.93
5.4.370.3800.03319.21
5.4.360.3470.04019.21
5.4.350.4000.03319.16
5.4.340.4570.03019.22
5.4.320.4530.03719.24
5.4.310.4130.04319.11
5.4.300.3770.03718.99
5.4.290.3870.03018.93
5.4.280.4470.03319.06
5.4.270.3100.03719.14
5.4.260.3170.03719.21
5.4.250.3700.04019.12
5.4.240.3130.03719.12
5.4.230.3300.04018.96
5.4.220.2470.04018.96
5.4.210.2730.03319.24
5.4.200.2670.04018.98
5.4.190.4670.03318.93
5.4.180.4300.04019.15
5.4.170.3800.03719.25
5.4.160.3930.03719.18
5.4.150.4970.03018.96
5.4.140.3770.04016.37
5.4.130.3530.02316.41
5.4.120.4530.03016.50
5.4.110.4530.04016.35
5.4.100.4670.04716.63
5.4.90.3770.03716.53
5.4.80.3930.04016.50
5.4.70.3770.03716.50
5.4.60.4130.03716.51
5.4.50.3870.03716.52
5.4.40.3570.03716.20
5.4.30.3370.04016.45
5.4.20.4170.02716.45
5.4.10.3830.03716.42
5.4.00.3770.03715.84
5.3.290.4130.04014.82
5.3.280.3070.03014.68
5.3.270.4000.03014.66
5.3.260.3970.04014.69
5.3.250.4100.03314.50
5.3.240.3400.03014.63
5.3.230.3600.03314.64
5.3.220.4470.03714.57
5.3.210.4530.04014.60
5.3.200.4530.03714.61
5.3.190.4000.04014.49
5.3.180.3900.03314.73
5.3.170.3970.03014.73
5.3.160.4100.04314.49
5.3.150.3900.02714.61
5.3.140.3800.04014.61
5.3.130.3870.03714.58
5.3.120.3830.04314.48
5.3.110.3830.03314.61
5.3.100.3770.04314.05
5.3.90.3370.03713.92
5.3.80.3530.03714.19
5.3.70.3800.02714.17
5.3.60.4570.03314.01
5.3.50.3900.04013.88
5.3.40.5630.03014.04
5.3.30.4130.03713.93
5.3.20.4370.02313.59
5.3.10.3800.03013.55
5.3.00.3970.04013.68
5.2.170.4700.03711.17
5.2.160.3870.02311.14
5.2.150.3630.03011.10
5.2.140.3470.03311.20
5.2.130.3830.03011.27
5.2.120.3870.02711.11
5.2.110.3430.03011.09
5.2.100.3430.02711.16
5.2.90.3300.02711.07
5.2.80.3470.02711.25
5.2.70.3200.03311.15
5.2.60.3270.03310.98
5.2.50.1770.02711.12
5.2.40.0070.06010.91
5.2.30.0000.04711.02
5.2.20.0030.05710.86
5.2.10.2100.03310.87
5.2.00.2800.03310.73
5.1.60.2800.02010.00
5.1.50.3200.02310.07
5.1.40.2670.03010.00
5.1.30.3200.02310.51
5.1.20.2600.03010.25
5.1.10.2600.02310.08
5.1.00.2330.02310.12
5.0.50.1730.0238.62
5.0.40.1900.0238.48
5.0.30.1470.0408.14
5.0.20.2000.0238.26
5.0.10.1470.0178.20
5.0.00.1400.0308.19
4.4.90.1200.0137.01
4.4.80.1500.0207.01
4.4.70.0000.0237.01
4.4.60.0030.0207.01
4.4.50.0030.0207.01
4.4.40.1430.0207.01
4.4.30.1330.0176.27
4.4.20.1230.0176.27
4.4.10.1470.0206.27
4.4.00.1700.0276.27
4.3.110.1730.0176.27
4.3.100.1770.0176.27
4.3.90.1770.0136.27
4.3.80.1500.0176.27
4.3.70.1570.0136.27
4.3.60.1470.0376.27
4.3.50.1830.0206.27
4.3.40.1700.0276.27
4.3.30.0870.0236.27
4.3.20.0900.0236.27
4.3.10.0770.0176.27
4.3.00.0770.0176.27

preferences:
63.23 ms | 401 KiB | 5 Q