3v4l.org

run code in 300+ PHP versions simultaneously
<?php class obj implements arrayaccess { private $container = array(); public function __construct() { $this->container = array( "one" => 1, "two" => 2, "three" => 3, ); } 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; } } $obj = new obj; var_dump($obj["two"]["2"]);

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.40.0120.00319.01
8.3.30.0110.00319.18
8.3.20.0050.00320.32
8.3.10.0080.00023.58
8.3.00.0030.00719.38
8.2.170.0120.00322.96
8.2.160.0030.01020.37
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0050.00222.08
8.2.110.0070.00421.00
8.2.100.0050.00519.76
8.2.90.0040.00417.88
8.2.80.0000.00817.97
8.2.70.0060.00318.16
8.2.60.0080.00018.16
8.2.50.0090.00018.10
8.2.40.0000.00919.30
8.2.30.0040.00418.15
8.2.20.0040.00417.76
8.2.10.0020.00517.66
8.2.00.0070.00017.85
8.1.270.0040.00423.96
8.1.260.0100.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00322.18
8.1.230.0000.01119.22
8.1.220.0050.00317.76
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0050.00317.35
8.1.180.0040.00418.10
8.1.170.0000.00818.67
8.1.160.0100.00022.02
8.1.150.0070.00018.65
8.1.140.0000.00717.30
8.1.130.0000.00717.88
8.1.120.0040.00417.50
8.1.110.0070.00017.52
8.1.100.0040.00417.47
8.1.90.0050.00317.49
8.1.80.0000.00917.56
8.1.70.0000.00717.34
8.1.60.0030.00617.59
8.1.50.0040.00417.38
8.1.40.0000.00817.53
8.1.30.0030.00617.57
8.1.20.0000.00717.71
8.1.10.0000.00717.61
8.1.00.0040.00417.39
8.0.300.0040.00419.69
8.0.290.0040.00416.88
8.0.280.0000.00718.36
8.0.270.0000.00717.18
8.0.260.0070.00016.89
8.0.250.0030.00316.91
8.0.240.0070.00017.01
8.0.230.0040.00417.06
8.0.220.0070.00016.92
8.0.210.0030.00316.98
8.0.200.0040.00416.91
8.0.190.0000.00716.89
8.0.180.0000.00717.03
8.0.170.0040.00416.84
8.0.160.0070.00017.04
8.0.150.0040.00416.91
8.0.140.0040.00416.95
8.0.130.0040.00413.36
8.0.120.0030.00516.88
8.0.110.0000.00716.85
8.0.100.0040.00416.97
8.0.90.0050.00216.86
8.0.80.0000.01416.85
8.0.70.0000.00816.91
8.0.60.0080.00017.06
8.0.50.0000.00717.02
8.0.30.0080.01017.20
8.0.20.0120.00817.40
8.0.10.0070.00016.99
8.0.00.0140.00616.69
7.4.330.0020.00215.14
7.4.320.0030.00316.52
7.4.300.0050.00316.49
7.4.290.0040.00416.52
7.4.280.0040.00416.53
7.4.270.0000.00816.50
7.4.260.0040.00416.59
7.4.250.0070.00016.60
7.4.240.0030.00316.49
7.4.230.0030.00316.50
7.4.220.0060.01216.72
7.4.210.0050.01216.63
7.4.200.0030.00316.57
7.4.190.0050.00216.34
7.4.160.0070.00716.70
7.4.150.0160.00317.40
7.4.140.0150.00317.86
7.4.130.0070.01016.45
7.4.120.0130.00416.54
7.4.110.0030.01316.57
7.4.100.0110.00816.50
7.4.90.0030.01316.52
7.4.80.0110.01119.39
7.4.70.0060.00916.47
7.4.60.0110.00616.63
7.4.50.0090.00016.26
7.4.40.0070.00722.77
7.4.30.0120.00416.66
7.4.00.0090.01014.98
7.3.330.0000.00513.37
7.3.320.0030.00313.34
7.3.310.0080.00016.41
7.3.300.0000.00716.33
7.3.290.0090.00616.29
7.3.280.0120.00816.31
7.3.270.0150.00317.40
7.3.260.0040.01716.41
7.3.250.0110.00816.27
7.3.240.0100.00616.51
7.3.230.0070.01016.39
7.3.210.0190.00316.47
7.3.200.0080.00819.39
7.3.190.0090.00916.49
7.3.180.0060.00916.35
7.3.170.0130.01016.31
7.3.160.0060.01516.57
7.3.120.0100.00614.92
7.3.110.0050.01314.94
7.3.100.0090.00714.69
7.3.90.0060.00814.91
7.3.80.0070.00514.86
7.3.70.0030.00914.82
7.3.60.0060.00414.60
7.3.50.0070.00714.68
7.3.40.0020.00914.87
7.3.30.0030.01114.77
7.3.20.0100.00516.80
7.3.10.0080.00616.64
7.3.00.0060.00716.65
7.2.330.0130.00516.48
7.2.320.0060.01216.51
7.2.310.0090.00916.63
7.2.300.0000.01616.75
7.2.290.0110.01116.76
7.2.250.0070.01115.29
7.2.240.0100.00915.02
7.2.230.0080.00814.85
7.2.220.0050.01015.18
7.2.210.0070.00415.24
7.2.200.0030.01014.84
7.2.190.0090.00414.86
7.2.180.0050.00914.92
7.2.170.0060.00715.05
7.2.160.0030.01415.28
7.2.150.0060.00917.10
7.2.140.0060.00316.74
7.2.130.0110.00516.87
7.2.120.0100.00516.86
7.2.110.0060.00916.95
7.2.100.0030.00916.82
7.2.90.0070.00616.90
7.2.80.0050.00617.05
7.2.70.0050.00616.99
7.2.60.0060.00616.99
7.2.50.0050.00816.84
7.2.40.0040.00916.88
7.2.30.0060.00616.84
7.2.20.0040.00817.01
7.2.10.0020.00816.94
7.2.00.0020.01317.80
7.1.330.0060.00615.66
7.1.320.0060.00815.88
7.1.310.0080.00515.87
7.1.300.0100.00515.79
7.1.290.0060.00615.76
7.1.280.0040.00915.63
7.1.270.0040.00715.83
7.1.260.0040.00815.61
7.1.250.0060.00615.82
7.1.240.0030.01415.77
7.1.230.0030.01015.51
7.1.220.0060.00615.72
7.1.210.0050.00515.98
7.1.200.0030.00915.66
7.1.190.0090.00315.89
7.1.180.0030.00715.92
7.1.170.0070.00715.93
7.1.160.0080.00015.68
7.1.150.0090.00315.58
7.1.140.0080.00415.80
7.1.130.0030.01215.77
7.1.120.0090.00315.66
7.1.110.0040.00815.48
7.1.100.0050.00716.95
7.1.90.0000.00915.57
7.1.80.0000.00915.76
7.1.70.0030.00816.63
7.1.60.0090.00917.68
7.1.50.0070.00916.45
7.1.40.0080.00815.77
7.1.30.0060.00315.75
7.1.20.0040.01115.75
7.1.10.0100.00315.46
7.1.00.0030.04319.01
7.0.330.0000.01315.51
7.0.320.0030.01015.43
7.0.310.0030.00615.48
7.0.300.0120.00315.42
7.0.290.0030.01315.39
7.0.280.0000.00715.38
7.0.270.0030.01015.61
7.0.260.0040.00815.25
7.0.250.0030.01015.46
7.0.240.0090.00615.36
7.0.230.0070.00715.56
7.0.220.0040.01115.33
7.0.210.0030.00915.14
7.0.200.0120.00315.93
7.0.190.0040.01115.42
7.0.180.0070.00715.30
7.0.170.0030.01015.58
7.0.160.0040.00415.28
7.0.150.0060.00315.45
7.0.140.0050.04018.65
7.0.130.0100.00615.25
7.0.120.0100.00715.31
7.0.110.0070.00615.44
7.0.100.0060.00615.23
7.0.90.0000.00915.20
7.0.80.0000.01415.53
7.0.70.0430.04117.76
7.0.60.0320.02817.69
7.0.50.0450.04418.00
7.0.40.0070.04016.71
7.0.30.0050.03216.75
7.0.20.0080.04316.74
7.0.10.0110.04516.87
7.0.00.0070.04416.77
5.6.380.0030.00914.66
5.6.370.0040.00914.34
5.6.360.0040.01214.41
5.6.350.0030.01014.51
5.6.340.0090.00314.72
5.6.330.0040.00414.42
5.6.320.0030.01014.52
5.6.310.0070.00314.23
5.6.300.0100.00014.30
5.6.290.0040.00414.60
5.6.280.0000.01414.35
5.6.270.0120.00014.36
5.6.260.0060.00614.46
5.6.250.0100.00314.64
5.6.240.0060.00614.37
5.6.230.0060.00614.39
5.6.220.0050.04617.69
5.6.210.0060.04617.37
5.6.200.0080.04517.72
5.6.190.0080.04717.80
5.6.180.0070.04417.48
5.6.170.0140.03017.63
5.6.160.0100.04217.69
5.6.150.0030.04717.50
5.6.140.0050.02517.60
5.6.130.0050.03417.58
5.6.120.0020.04917.70
5.6.110.0100.04517.83
5.6.100.0130.02817.57
5.6.90.0060.03617.66
5.6.80.0070.04517.35
5.6.70.0080.03617.43
5.6.60.0090.04417.37
5.6.50.0050.04217.44
5.6.40.0080.04117.34
5.6.30.0050.04617.36
5.6.20.0050.04717.33
5.6.10.0090.02117.18
5.6.00.0050.02317.38
5.5.380.0030.00711.64
5.5.370.0000.01011.64
5.5.360.0050.04716.03
5.5.350.0030.04316.02
5.5.340.0070.04316.26
5.5.330.0060.03116.24
5.5.320.0090.04216.27
5.5.310.0010.03416.28
5.5.300.0030.04716.14
5.5.290.0030.03016.26
5.5.280.0090.03116.28
5.5.270.0050.04016.25
5.5.260.0050.04516.26
5.5.250.0050.04516.12
5.5.240.0070.04115.96
5.5.230.0070.03715.88
5.5.220.0090.03715.95
5.5.210.0070.03815.90
5.5.200.0050.04315.82
5.5.190.0100.03815.93
5.5.180.0050.04215.88
5.5.170.0040.00711.64
5.5.160.0030.02715.92
5.5.150.0070.03815.96
5.5.140.0080.04315.90
5.5.130.0000.04915.95
5.5.120.0080.01815.86
5.5.110.0080.04215.91
5.5.100.0120.03715.91
5.5.90.0020.02415.87
5.5.80.0030.04615.83
5.5.70.0050.04315.87
5.5.60.0100.03715.90
5.5.50.0050.04515.85
5.5.40.0030.04715.90
5.5.30.0100.03315.86
5.5.20.0110.03915.87
5.5.10.0060.04515.80
5.5.00.0030.02915.83
5.4.450.0080.04115.57
5.4.440.0070.02315.59
5.4.430.0030.04415.57
5.4.420.0080.04315.45
5.4.410.0020.03515.34
5.4.400.0080.03915.26
5.4.390.0080.04315.25
5.4.380.0100.03615.41
5.4.370.0050.04315.38
5.4.360.0020.04715.36
5.4.350.0090.03615.34
5.4.340.0100.02115.41
5.4.330.0030.00311.64
5.4.320.0070.04215.38
5.4.310.0080.04215.38
5.4.300.0070.03315.42
5.4.290.0070.02115.27
5.4.280.0100.01515.41
5.4.270.0050.02215.38
5.4.260.0000.02415.32
5.4.250.0000.02515.24
5.4.240.0050.02215.42
5.4.230.0050.04315.36
5.4.220.0050.03715.43
5.4.210.0050.03815.34
5.4.200.0060.03815.34
5.4.190.0110.03715.42
5.4.180.0080.04015.43
5.4.170.0050.03015.28
5.4.160.0080.03815.23
5.4.150.0070.03815.40
5.4.140.0030.02814.03
5.4.130.0080.03813.99
5.4.120.0050.02314.05
5.4.110.0070.03814.00
5.4.100.0040.02414.03
5.4.90.0020.04014.03
5.4.80.0060.04013.99
5.4.70.0110.03213.93
5.4.60.0030.02814.06
5.4.50.0100.03414.02
5.4.40.0050.03114.07
5.4.30.0080.02014.02
5.4.20.0030.03813.96
5.4.10.0050.02214.03
5.4.00.0020.04313.75
5.3.290.0090.04013.16
5.3.280.0090.03913.15
5.3.270.0080.03513.17
5.3.260.0020.04713.19
5.3.250.0080.03813.13
5.3.240.0020.02713.16
5.3.230.0060.02513.10
5.3.220.0080.04013.16
5.3.210.0050.03413.16
5.3.200.0070.03913.14
5.3.190.0050.04213.13
5.3.180.0110.02213.13
5.3.170.0010.03113.16
5.3.160.0070.03713.07
5.3.150.0050.04013.08
5.3.140.0030.04613.09
5.3.130.0030.04313.15
5.3.120.0060.03413.14
5.3.110.0000.03013.09
5.3.100.0030.02512.86
5.3.90.0020.02412.90
5.3.80.0070.02312.82
5.3.70.0020.03312.82
5.3.60.0000.03012.88
5.3.50.0030.03512.80
5.3.40.0050.03712.82
5.3.30.0080.04012.77
5.3.20.0030.04112.63
5.3.10.0050.03912.64
5.3.00.0080.03312.69
5.2.170.0030.03612.52
5.2.160.0040.02812.52
5.2.150.0020.02612.52
5.2.140.0030.03812.52
5.2.130.0110.02712.52
5.2.120.0030.03512.52
5.2.110.0040.02712.52
5.2.100.0020.02712.52
5.2.90.0050.01912.52
5.2.80.0020.03712.52
5.2.70.0070.02812.52
5.2.60.0030.03612.52
5.2.50.0000.03112.52
5.2.40.0020.02512.52
5.2.30.0000.03912.52
5.2.20.0020.03712.52
5.2.10.0070.03312.52
5.2.00.0130.02512.52
5.1.60.0060.02512.52
5.1.50.0030.03012.52
5.1.40.0020.02912.52
5.1.30.0060.01812.52
5.1.20.0000.03412.52
5.1.10.0020.02712.52
5.1.00.0020.03412.52
5.0.50.0000.02512.52
5.0.40.0040.02412.52
5.0.30.0050.03412.52
5.0.20.0020.01712.52
5.0.10.0010.01412.52
5.0.00.0020.03512.52
4.4.90.0000.01212.52
4.4.80.0050.01412.52
4.4.70.0030.02012.52
4.4.60.0030.02012.52
4.4.50.0010.02012.52
4.4.40.0000.02012.52
4.4.30.0020.02212.52
4.4.20.0030.01512.52
4.4.10.0010.01812.52
4.4.00.0030.02512.52
4.3.110.0000.02212.52
4.3.100.0030.01612.52
4.3.90.0020.01312.52
4.3.80.0020.03012.52
4.3.70.0050.01712.52
4.3.60.0020.02012.52
4.3.50.0020.01812.52
4.3.40.0070.02212.52
4.3.30.0000.02312.52
4.3.20.0000.02312.52
4.3.10.0020.02012.52
4.3.00.0020.01712.52

preferences:
46.98 ms | 400 KiB | 5 Q