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([9 => 1, 8 => 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.00918.68
8.3.50.0150.00722.05
8.3.40.0110.00418.96
8.3.30.0110.00418.96
8.3.20.0000.00820.20
8.3.10.0080.00023.58
8.3.00.0050.00319.04
8.2.180.0120.00616.63
8.2.170.0070.01022.96
8.2.160.0110.00422.21
8.2.150.0060.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0040.00419.66
8.2.110.0060.00319.14
8.2.100.0080.00417.78
8.2.90.0000.00720.42
8.2.80.0040.00417.97
8.2.70.0040.00417.80
8.2.60.0030.01018.22
8.2.50.0000.00818.10
8.2.40.0000.00819.50
8.2.30.0040.00419.26
8.2.20.0040.00417.72
8.2.10.0000.00718.11
8.2.00.0000.00817.74
8.1.280.0040.01125.92
8.1.270.0080.00019.00
8.1.260.0100.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00623.95
8.1.230.0040.00720.91
8.1.220.0030.00617.74
8.1.210.0050.00318.95
8.1.200.0060.00317.38
8.1.190.0080.00017.53
8.1.180.0040.00418.10
8.1.170.0040.00420.78
8.1.160.0070.00018.97
8.1.150.0040.00418.77
8.1.140.0090.00017.50
8.1.130.0040.00417.78
8.1.120.0040.00317.45
8.1.110.0060.00317.50
8.1.100.0030.00517.52
8.1.90.0000.00717.36
8.1.80.0000.00717.46
8.1.70.0070.00017.50
8.1.60.0060.00317.57
8.1.50.0090.00017.59
8.1.40.0060.00317.58
8.1.30.0040.00417.55
8.1.20.0000.00817.65
8.1.10.0040.00417.61
8.1.00.0000.00717.43
8.0.300.0050.00319.89
8.0.290.0030.00516.75
8.0.280.0070.00018.50
8.0.270.0000.00717.31
8.0.260.0040.00417.27
8.0.250.0030.00316.99
8.0.240.0080.00017.01
8.0.230.0000.00716.98
8.0.220.0000.00716.94
8.0.210.0000.00716.78
8.0.200.0030.00317.03
8.0.190.0040.00416.99
8.0.180.0000.00816.98
8.0.170.0000.00716.93
8.0.160.0040.00416.90
8.0.150.0030.00316.82
8.0.140.0000.00816.76
8.0.130.0030.00313.29
8.0.120.0090.00016.79
8.0.110.0000.00816.91
8.0.100.0040.00416.91
8.0.90.0000.00716.78
8.0.80.0080.00816.88
8.0.70.0040.00416.96
8.0.60.0040.00416.97
8.0.50.0000.00816.77
8.0.30.0090.01217.13
8.0.20.0120.01217.40
8.0.10.0030.00517.01
8.0.00.0090.00916.66
7.4.330.0000.00515.08
7.4.320.0070.00016.59
7.4.300.0030.00316.49
7.4.290.0030.00316.59
7.4.280.0000.00716.40
7.4.270.0000.00716.52
7.4.260.0060.00616.52
7.4.250.0040.00416.58
7.4.240.0030.00416.50
7.4.230.0000.00716.58
7.4.220.0110.00716.65
7.4.210.0060.00916.46
7.4.200.0040.00416.61
7.4.160.0060.01016.56
7.4.150.0070.01617.40
7.4.140.0100.00717.86
7.4.130.0120.00616.63
7.4.120.0100.00716.54
7.4.110.0100.01416.55
7.4.100.0120.00916.61
7.4.90.0100.00716.29
7.4.80.0210.02719.39
7.4.70.0120.00616.42
7.4.60.0150.00916.56
7.4.50.0030.00616.46
7.4.40.0120.00616.57
7.4.30.0140.00316.58
7.4.10.0160.00314.66
7.4.00.0030.01214.86
7.3.330.0060.00013.34
7.3.320.0000.00513.18
7.3.310.0030.00316.35
7.3.300.0040.00416.13
7.3.290.0090.00716.30
7.3.280.0070.01016.36
7.3.270.0000.01717.40
7.3.260.0030.01716.32
7.3.250.0060.01216.39
7.3.240.0030.01516.41
7.3.230.0090.00616.39
7.3.210.0150.00316.47
7.3.200.0080.00919.39
7.3.190.0120.00916.46
7.3.180.0060.01116.46
7.3.170.0060.01216.31
7.3.160.0060.00916.36
7.3.130.0100.01014.77
7.3.120.0060.01014.74
7.3.110.0070.01314.76
7.3.100.0100.00314.97
7.3.90.0130.00314.75
7.3.80.0070.01114.90
7.3.70.0030.01014.86
7.3.60.0030.01314.79
7.3.50.0000.01414.56
7.3.40.0080.00614.94
7.3.30.0090.00314.89
7.3.20.0040.00916.58
7.3.10.0060.00916.57
7.3.00.0150.00016.69
7.2.330.0060.01316.71
7.2.320.0030.01516.53
7.2.310.0110.00616.48
7.2.300.0040.01216.48
7.2.290.0130.00316.53
7.2.260.0060.01315.02
7.2.250.0140.00315.20
7.2.240.0030.01314.91
7.2.230.0070.01015.03
7.2.220.0040.01114.91
7.2.210.0070.00715.14
7.2.200.0040.01114.97
7.2.190.0070.01015.14
7.2.180.0070.00715.07
7.2.170.0030.01014.89
7.2.160.0030.01014.84
7.2.150.0000.01316.86
7.2.140.0110.00416.95
7.2.130.0000.01017.06
7.2.120.0030.00716.77
7.2.110.0050.00816.81
7.2.100.0040.00816.93
7.2.90.0040.01416.88
7.2.80.0070.00316.70
7.2.70.0060.01016.84
7.2.60.0060.00816.74
7.2.50.0070.01016.73
7.2.40.0180.00017.02
7.2.30.0100.00317.06
7.2.20.0000.01517.06
7.2.10.0060.00916.93
7.2.00.0060.00818.21
7.1.330.0070.00715.90
7.1.320.0090.00615.90
7.1.310.0080.00415.65
7.1.300.0100.00715.77
7.1.290.0060.00615.92
7.1.280.0110.00315.48
7.1.270.0030.00615.85
7.1.260.0030.01015.91
7.1.250.0030.00915.75
7.1.240.0100.00315.94
7.1.230.0030.00615.80
7.1.220.0030.01315.87
7.1.210.0030.00915.71
7.1.200.0060.00815.68
7.1.190.0090.00615.58
7.1.180.0050.00515.71
7.1.170.0040.00415.62
7.1.160.0040.01415.74
7.1.150.0080.00815.54
7.1.140.0070.00715.77
7.1.130.0000.01315.61
7.1.120.0030.00915.79
7.1.110.0070.01015.80
7.1.100.0070.00616.96
7.1.90.0000.01315.82
7.1.80.0030.00915.54
7.1.70.0060.00816.57
7.1.60.0030.01717.56
7.1.50.0100.00616.04
7.1.40.0000.00915.95
7.1.30.0030.00715.80
7.1.20.0030.00715.87
7.1.10.0110.00715.83
7.1.00.0090.03719.08
7.0.330.0070.00715.36
7.0.320.0050.00815.19
7.0.310.0000.01515.25
7.0.300.0030.00915.26
7.0.290.0030.01015.44
7.0.280.0090.00015.49
7.0.270.0040.01215.43
7.0.260.0000.01515.39
7.0.250.0060.00315.47
7.0.240.0040.00815.39
7.0.230.0110.00415.43
7.0.220.0030.01015.42
7.0.210.0060.00615.44
7.0.200.0060.00315.93
7.0.190.0060.01015.49
7.0.180.0070.00715.45
7.0.170.0060.00915.22
7.0.160.0030.01015.43
7.0.150.0100.00715.15
7.0.140.0030.04118.80
7.0.130.0080.00015.35
7.0.120.0040.01115.29
7.0.110.0210.04017.79
7.0.100.0100.04117.68
7.0.90.0110.04317.64
7.0.80.0080.04117.60
7.0.70.0110.04417.69
7.0.60.0050.04717.75
7.0.50.0100.02817.67
7.0.40.0060.04616.64
7.0.30.0030.04316.74
7.0.20.0070.02516.49
7.0.10.0050.04516.57
7.0.00.0070.02316.65
5.6.400.0000.01114.29
5.6.390.0000.01414.51
5.6.380.0030.00914.33
5.6.370.0060.00914.18
5.6.360.0070.01014.46
5.6.350.0060.00614.79
5.6.340.0070.00714.46
5.6.330.0040.01114.70
5.6.320.0070.00714.59
5.6.310.0040.01114.39
5.6.300.0070.01014.21
5.6.290.0060.01214.58
5.6.280.0060.04017.66
5.6.270.0110.00414.64
5.6.260.0050.04617.52
5.6.250.0060.04617.47
5.6.240.0080.02717.40
5.6.230.0100.04217.49
5.6.220.0080.02317.63
5.6.210.0120.04017.61
5.6.200.0060.02317.56
5.6.190.0080.04617.53
5.6.180.0070.03817.37
5.6.170.0060.03017.57
5.6.160.0100.04217.44
5.6.150.0050.04717.65
5.6.140.0080.03817.56
5.6.130.0140.03817.41
5.6.120.0160.03517.28
5.6.110.0130.03617.55
5.6.100.0070.04517.58
5.6.90.0090.04217.49
5.6.80.0120.03717.17
5.6.70.0070.04217.33
5.6.60.0050.04317.20
5.6.50.0050.04217.12
5.6.40.0090.03317.08
5.6.30.0050.03917.11
5.6.20.0030.05017.16
5.6.10.0050.02317.13
5.6.00.0050.04317.20
5.5.380.0070.04415.84
5.5.370.0090.02215.84
5.5.360.0110.03815.89
5.5.350.0100.04016.03
5.5.340.0100.03215.98
5.5.330.0050.02716.23
5.5.320.0070.04116.15
5.5.310.0020.04816.07
5.5.300.0110.03816.26
5.5.290.0100.03816.27
5.5.280.0050.03016.30
5.5.270.0060.02216.15
5.5.260.0070.03816.15
5.5.250.0120.03716.00
5.5.240.0080.03515.81
5.5.230.0070.04415.76
5.5.220.0050.03915.77
5.5.210.0080.04515.78
5.5.200.0080.04215.83
5.5.190.0050.03915.77
5.5.180.0030.02215.84
5.5.170.0030.00914.13
5.5.160.0060.02015.82
5.5.150.0100.02215.85
5.5.140.0060.03715.87
5.5.130.0050.03715.84
5.5.120.0050.04715.89
5.5.110.0020.04415.59
5.5.100.0060.02015.71
5.5.90.0030.03815.82
5.5.80.0020.04215.95
5.5.70.0070.03515.79
5.5.60.0040.04415.60
5.5.50.0070.03715.73
5.5.40.0050.03615.73
5.5.30.0020.02915.92
5.5.20.0030.04115.92
5.5.10.0110.03815.72
5.5.00.0080.04015.65
5.4.450.0060.02315.65
5.4.440.0110.03815.62
5.4.430.0030.03215.54
5.4.420.0070.03515.56
5.4.410.0120.03515.50
5.4.400.0020.04015.46
5.4.390.0090.03215.50
5.4.380.0020.02715.51
5.4.370.0080.04015.58
5.4.360.0080.03615.41
5.4.350.0020.04315.57
5.4.340.0020.04415.53
5.4.330.0060.00611.82
5.4.320.0050.02115.41
5.4.310.0070.02715.43
5.4.300.0030.04015.40
5.4.290.0030.04615.40
5.4.280.0040.02315.43
5.4.270.0130.03715.53
5.4.260.0050.04015.38
5.4.250.0060.02215.53
5.4.240.0050.03715.45
5.4.230.0030.02515.48
5.4.220.0070.04115.39
5.4.210.0020.02315.38
5.4.200.0110.03615.49
5.4.190.0120.03015.42
5.4.180.0080.04115.49
5.4.170.0050.04015.51
5.4.160.0050.04315.39
5.4.150.0020.04215.48
5.4.140.0050.03914.22
5.4.130.0040.02414.08
5.4.120.0090.03714.10
5.4.110.0060.02514.24
5.4.100.0070.03514.12
5.4.90.0100.02814.07
5.4.80.0050.02014.14
5.4.70.0030.04214.18
5.4.60.0050.03814.10
5.4.50.0060.03914.17
5.4.40.0090.03914.05
5.4.30.0070.02214.05
5.4.20.0030.03814.18
5.4.10.0040.02514.15
5.4.00.0120.02213.83
5.3.290.0000.07314.82
5.3.280.0100.07314.70
5.3.270.0070.07314.60
5.3.260.0070.05014.63
5.3.250.0130.07014.64
5.3.240.0100.07014.63
5.3.230.0100.07014.57
5.3.220.0170.05314.58
5.3.210.0000.08314.60
5.3.200.0070.07314.66
5.3.190.0030.07714.57
5.3.180.0070.06314.59
5.3.170.0100.07014.80
5.3.160.0070.07314.80
5.3.150.0070.07014.58
5.3.140.0070.07314.42
5.3.130.0070.07714.52
5.3.120.0000.06014.57
5.3.110.0070.04314.55
5.3.100.0100.04714.08
5.3.90.0030.07314.04
5.3.80.0030.04314.15
5.3.70.0030.04714.16
5.3.60.0070.04014.09
5.3.50.0070.06713.95
5.3.40.0130.06014.09
5.3.30.0030.07313.93
5.3.20.0000.07713.73
5.3.10.0270.02013.67
5.3.00.0030.07313.68
5.2.170.0100.05311.93
5.2.160.0030.03011.93
5.2.150.0030.06311.93
5.2.140.0070.05311.93
5.2.130.0100.03011.93
5.2.120.0030.06011.93
5.2.110.0030.05711.93
5.2.100.0070.05711.93
5.2.90.0030.05711.93
5.2.80.0100.05711.93
5.2.70.0100.03011.93
5.2.60.0030.04011.93
5.2.50.0030.06011.93
5.2.40.0000.06311.93
5.2.30.0030.04311.93
5.2.20.0030.03311.93
5.2.10.0070.04311.93
5.2.00.0130.05311.93
5.1.60.0000.06011.93
5.1.50.0070.05011.93
5.1.40.0030.05711.93
5.1.30.0030.04711.93
5.1.20.0030.06011.93
5.1.10.0030.05311.93
5.1.00.0070.05311.93
5.0.50.0030.03011.93
5.0.40.0000.03311.93
5.0.30.0070.06011.93
5.0.20.0000.04311.93
5.0.10.0070.02711.93
5.0.00.0100.05711.93
4.4.90.0000.03711.93
4.4.80.0000.03711.93
4.4.70.0000.02711.93
4.4.60.0000.03011.93
4.4.50.0000.02311.93
4.4.40.0070.03311.93
4.4.30.0030.03311.93
4.4.20.0000.03711.93
4.4.10.0070.03011.93
4.4.00.0070.05011.93
4.3.110.0070.01711.93
4.3.100.0000.03311.93
4.3.90.0000.03311.93
4.3.80.0030.04711.93
4.3.70.0000.03311.93
4.3.60.0070.02311.93
4.3.50.0000.03711.93
4.3.40.0070.04711.93
4.3.30.0000.03711.93
4.3.20.0030.03311.93
4.3.10.0030.02711.93
4.3.00.0030.03311.93

preferences:
66.32 ms | 401 KiB | 5 Q