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"]);

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.0090.00618.97
8.3.30.0110.00718.97
8.3.20.0050.00318.88
8.3.10.0000.00818.85
8.3.00.0080.00319.50
8.2.170.0120.00322.96
8.2.160.0090.00619.04
8.2.150.0000.00724.18
8.2.140.0000.00824.66
8.2.130.0000.00726.16
8.2.120.0070.00020.96
8.2.110.0090.00020.35
8.2.100.0090.00317.91
8.2.90.0040.00417.88
8.2.80.0060.00318.83
8.2.70.0030.00717.63
8.2.60.0040.00418.03
8.2.50.0000.00818.03
8.2.40.0060.00319.48
8.2.30.0030.00617.79
8.2.20.0060.00617.68
8.2.10.0030.00517.63
8.2.00.0050.00317.65
8.1.270.0050.00323.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00419.01
8.1.230.0080.00417.73
8.1.220.0000.00817.79
8.1.210.0070.00418.77
8.1.200.0080.00017.34
8.1.190.0080.00017.36
8.1.180.0100.00018.10
8.1.170.0040.00417.62
8.1.160.0080.00018.98
8.1.150.0000.00718.54
8.1.140.0040.00417.37
8.1.130.0040.00417.57
8.1.120.0040.00417.52
8.1.110.0080.00017.36
8.1.100.0030.00417.36
8.1.90.0050.00317.45
8.1.80.0040.00417.45
8.1.70.0020.00517.50
8.1.60.0040.00417.52
8.1.50.0040.00417.42
8.1.40.0030.00617.43
8.1.30.0000.00817.66
8.1.20.0000.00817.63
8.1.10.0050.00317.54
8.1.00.0050.00317.58
8.0.300.0080.00018.77
8.0.290.0060.00316.75
8.0.280.0040.00418.57
8.0.270.0040.00417.23
8.0.260.0000.00716.87
8.0.250.0050.00217.01
8.0.240.0000.00717.00
8.0.230.0000.00816.82
8.0.220.0000.00816.82
8.0.210.0000.00716.86
8.0.200.0070.00016.87
8.0.190.0050.00316.85
8.0.180.0060.00616.92
8.0.170.0030.00516.95
8.0.160.0000.00716.90
8.0.150.0040.00416.75
8.0.140.0050.00216.77
8.0.130.0050.00013.33
8.0.120.0050.00516.82
8.0.110.0000.00816.91
8.0.100.0070.00016.93
8.0.90.0040.00417.02
8.0.80.0040.01116.79
8.0.70.0060.00316.76
8.0.60.0060.00316.94
8.0.50.0090.00016.78
8.0.30.0130.00917.27
8.0.20.0110.01016.83
8.0.10.0030.00516.89
8.0.00.0110.01016.99
7.4.330.0050.00012.93
7.4.320.0000.00716.52
7.4.300.0000.00616.50
7.4.290.0000.00916.52
7.4.280.0070.00016.47
7.4.270.0000.00716.58
7.4.260.0000.00513.25
7.4.250.0050.00316.58
7.4.240.0000.00716.50
7.4.230.0030.00316.63
7.4.220.0090.00916.55
7.4.210.0030.01716.72
7.4.200.0030.00316.63
7.4.190.0000.01016.69
7.4.160.0130.01016.35
7.4.150.0070.01016.48
7.4.140.0070.01617.86
7.4.130.0160.00316.58
7.4.120.0120.00616.42
7.4.110.0130.01016.66
7.4.100.0130.00716.49
7.4.90.0180.00016.50
7.4.80.0080.00819.39
7.4.70.0130.01016.55
7.4.60.0160.00016.63
7.4.50.0030.00516.42
7.4.40.0100.00316.47
7.4.30.0030.01416.48
7.4.00.0090.00514.77
7.3.330.0070.00013.23
7.3.320.0050.00013.19
7.3.310.0040.00416.22
7.3.300.0030.00316.37
7.3.290.0060.00916.26
7.3.280.0040.01116.28
7.3.270.0110.00816.69
7.3.260.0180.00416.30
7.3.240.0130.00316.26
7.3.230.0050.01116.34
7.3.210.0100.00616.42
7.3.200.0090.00916.41
7.3.190.0120.00316.57
7.3.180.0120.00316.45
7.3.170.0100.01016.52
7.3.160.0040.01416.44
7.3.120.0070.00814.87
7.3.110.0090.00714.64
7.3.100.0070.01014.89
7.3.90.0040.00814.61
7.3.80.0050.00514.74
7.3.70.0080.00414.80
7.3.60.0030.00914.93
7.3.50.0030.01014.73
7.3.40.0000.00914.59
7.3.30.0030.00614.52
7.3.20.0050.00316.73
7.3.10.0050.01016.69
7.3.00.0060.01116.72
7.2.330.0090.01516.80
7.2.320.0000.01616.28
7.2.310.0130.01016.85
7.2.300.0030.01416.88
7.2.290.0100.01316.79
7.2.250.0040.01514.84
7.2.240.0090.00614.67
7.2.230.0120.00614.96
7.2.220.0000.01215.02
7.2.210.0060.00615.09
7.2.200.0070.00415.04
7.2.190.0000.01514.79
7.2.180.0030.00615.16
7.2.170.0100.00315.05
7.2.130.0040.01416.70
7.2.120.0030.00617.04
7.2.110.0150.00516.54
7.2.100.0060.01217.05
7.2.90.0000.01017.02
7.2.80.0100.00816.68
7.2.70.0090.00317.19
7.2.60.0060.00916.97
7.2.50.0040.01816.91
7.2.40.0070.01117.15
7.2.30.0070.01117.02
7.2.20.0150.00616.94
7.2.10.0000.01716.98
7.2.00.0030.01218.07
7.1.330.0000.01515.63
7.1.320.0060.00615.76
7.1.310.0080.00515.83
7.1.300.0040.01115.55
7.1.290.0070.00415.83
7.1.280.0030.01015.61
7.1.270.0000.01315.52
7.1.260.0060.00615.82
7.1.250.0050.00315.77
7.1.200.0070.00715.82
7.1.100.0190.00818.01
7.1.70.0040.00816.92
7.1.60.0070.01719.25
7.1.50.0060.01117.04
7.1.00.0000.07022.39
7.0.200.0100.00516.41
7.0.140.0030.07322.10
7.0.120.0000.03322.18
7.0.60.0100.07321.72
7.0.50.0070.05717.89
7.0.40.0100.04320.25
7.0.30.0230.08320.09
7.0.20.0330.07020.09
7.0.10.0130.07720.15
7.0.00.0070.07020.06
5.6.280.0100.06721.13
5.6.210.0170.07320.67
5.6.200.0130.03018.29
5.6.190.0000.09720.39
5.6.180.0200.07320.48
5.6.170.0230.05020.56
5.6.160.0030.07720.56
5.6.150.0030.08018.21
5.6.140.0070.08018.18
5.6.130.0130.08018.23
5.6.120.0100.03321.13
5.6.110.0030.08720.87
5.6.100.0070.04321.00
5.6.90.0030.09020.95
5.6.80.0030.06320.38
5.5.350.0030.03320.45
5.5.340.0000.06318.09
5.5.330.0070.08720.28
5.5.320.0170.04320.25
5.5.310.0200.07720.51
5.5.300.0000.04317.99
5.5.290.0070.04318.06
5.5.280.0130.08020.66
5.5.270.0030.05020.66
5.5.260.0100.08020.76
5.5.250.0100.07720.71
5.5.240.0130.07720.13
5.4.450.0100.03319.48
5.4.440.0070.03719.48
5.4.430.0070.03319.56
5.4.420.0000.04019.44
5.4.410.0000.04019.43
5.4.400.0030.03718.95
5.4.390.0070.04319.25
5.4.380.0100.03019.15
5.4.370.0070.03319.16
5.4.360.0070.03319.24
5.4.350.0000.04018.85
5.4.340.0030.08319.15
5.4.320.0030.07719.24
5.4.310.0030.04019.10
5.4.300.0070.04319.00
5.4.290.0100.06319.16
5.4.280.0030.08318.92
5.4.270.0100.06018.92
5.4.260.0100.07719.20
5.4.250.0000.04019.23
5.4.240.0100.07019.24
5.4.230.0100.04019.19
5.4.220.0070.03719.16
5.4.210.0130.07019.20
5.4.200.0070.03719.23
5.4.190.0100.07319.22
5.4.180.0030.05718.84
5.4.170.0070.08019.13
5.4.160.0100.04719.12
5.4.150.0030.05318.84
5.4.140.0070.07716.55
5.4.130.0000.07016.40
5.4.120.0070.03316.49
5.4.110.0100.06316.45
5.4.100.0000.04316.50
5.4.90.0170.06316.43
5.4.80.0000.05716.41
5.4.70.0030.04716.37
5.4.60.0030.06316.41
5.4.50.0100.06016.26
5.4.40.0130.06716.40
5.4.30.0070.07316.50
5.4.20.0070.07316.46
5.4.10.0070.07716.31
5.4.00.0030.05315.85
5.3.290.0000.04714.68
5.3.280.0130.05014.49
5.3.270.0070.07014.66
5.3.260.0030.04014.64
5.3.250.0100.07714.76
5.3.240.0070.05714.66
5.3.230.0000.07314.64
5.3.220.0070.03314.57
5.3.210.0100.07714.61
5.3.200.0030.05714.57
5.3.190.0000.04714.58
5.3.180.0130.07014.57
5.3.170.0070.06714.57
5.3.160.0100.04314.49
5.3.150.0000.05014.58
5.3.140.0070.07014.61
5.3.130.0070.06014.71
5.3.120.0030.08014.71
5.3.110.0100.07314.63
5.3.100.0000.05014.04
5.3.90.0030.07714.20
5.3.80.0100.07714.09
5.3.70.0100.03314.18
5.3.60.0100.06313.98
5.3.50.0100.06313.98
5.3.40.0030.03713.88
5.3.30.0070.06713.82
5.3.20.0070.06013.67
5.3.10.0030.04713.67
5.3.00.0130.05713.80
5.2.170.0070.06011.19
5.2.160.0000.04011.19
5.2.150.0100.02311.31
5.2.140.0070.03311.19
5.2.130.0070.06011.08
5.2.120.0070.04711.11
5.2.110.0000.04711.14
5.2.100.0100.03011.07
5.2.90.0030.03011.15
5.2.80.0070.06011.25
5.2.70.0100.05311.11
5.2.60.0000.07011.06
5.2.50.0070.06011.18
5.2.40.0170.05011.08
5.2.30.0000.04710.93
5.2.20.0070.06010.97
5.2.10.0000.06310.93
5.2.00.0070.05710.69
5.1.60.0030.05710.00
5.1.50.0000.05710.02
5.1.40.0030.05710.03
5.1.30.0070.06010.35
5.1.20.0000.04710.37
5.1.10.0100.05310.13
5.1.00.0100.05310.14
5.0.50.0070.0438.59
5.0.40.0000.0208.33
5.0.30.0030.0508.25
5.0.20.0000.0308.29
5.0.10.0030.0278.15
5.0.00.0070.0638.15
4.4.90.0000.0377.67
4.4.80.0000.0237.67
4.4.70.0000.0277.67
4.4.60.0030.0237.67
4.4.50.0030.0337.67
4.4.40.0030.0577.67
4.4.30.0030.0337.67
4.4.20.0030.0337.67
4.4.10.0000.0237.67
4.4.00.0000.0277.67
4.3.110.0000.0407.67
4.3.100.0000.0237.67
4.3.90.0070.0337.67
4.3.80.0000.0577.67
4.3.70.0030.0307.67
4.3.60.0000.0307.67
4.3.50.0000.0377.67
4.3.40.0000.0507.68
4.3.30.0030.0307.68
4.3.20.0070.0237.68
4.3.10.0070.0277.68
4.3.00.0030.0337.68

preferences:
44.4 ms | 400 KiB | 5 Q