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) { var_dump($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.60.0040.01518.55
8.3.50.0170.00421.20
8.3.40.0120.00319.09
8.3.30.0150.00018.76
8.3.20.0030.00618.90
8.3.10.0060.00320.61
8.3.00.0080.00019.38
8.2.180.0150.00616.50
8.2.170.0190.00322.96
8.2.160.0090.00622.26
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00826.16
8.2.120.0030.00519.77
8.2.110.0000.00921.00
8.2.100.0090.00317.84
8.2.90.0050.00319.21
8.2.80.0080.00017.97
8.2.70.0030.00717.63
8.2.60.0040.00418.03
8.2.50.0030.00518.07
8.2.40.0050.00318.22
8.2.30.0100.00018.19
8.2.20.0040.00417.60
8.2.10.0040.00417.63
8.2.00.0020.00517.74
8.1.280.0120.00625.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0070.00322.64
8.1.230.0070.00420.96
8.1.220.0030.00618.77
8.1.210.0040.00418.84
8.1.200.0030.00717.36
8.1.190.0000.00717.53
8.1.180.0060.00318.10
8.1.170.0000.00818.96
8.1.160.0070.00018.77
8.1.150.0040.00418.56
8.1.140.0050.00317.46
8.1.130.0000.00717.84
8.1.120.0050.00217.40
8.1.110.0000.00717.43
8.1.100.0040.00417.39
8.1.90.0000.00817.54
8.1.80.0040.00417.39
8.1.70.0070.00017.43
8.1.60.0030.00617.48
8.1.50.0030.00517.48
8.1.40.0000.00817.43
8.1.30.0050.00217.64
8.1.20.0080.00017.69
8.1.10.0050.00317.61
8.1.00.0030.00617.54
8.0.300.0040.00420.07
8.0.290.0040.00416.88
8.0.280.0000.00718.36
8.0.270.0030.00417.26
8.0.260.0000.00718.46
8.0.250.0040.00417.02
8.0.240.0070.00317.02
8.0.230.0030.00317.01
8.0.220.0000.00716.92
8.0.210.0040.00416.91
8.0.200.0050.00216.98
8.0.190.0000.00717.00
8.0.180.0080.00017.00
8.0.170.0040.00416.88
8.0.160.0060.00317.01
8.0.150.0000.00816.77
8.0.140.0000.00816.88
8.0.130.0000.00513.41
8.0.120.0000.00716.92
8.0.110.0040.00416.83
8.0.100.0000.00716.92
8.0.90.0000.00716.94
8.0.80.0030.01717.06
8.0.70.0000.00716.91
8.0.60.0000.00817.00
8.0.50.0050.00316.85
8.0.30.0030.01517.21
8.0.20.0100.01017.40
8.0.10.0040.00417.02
8.0.00.0100.00716.60
7.4.330.0030.00313.43
7.4.320.0000.00616.55
7.4.300.0030.00316.66
7.4.290.0070.00016.47
7.4.280.0080.00016.50
7.4.270.0070.00016.52
7.4.260.0030.00313.29
7.4.250.0090.00016.57
7.4.240.0000.00816.62
7.4.230.0080.00016.68
7.4.220.0160.01016.58
7.4.210.0060.01116.62
7.4.200.0020.00516.59
7.4.190.0000.00716.71
7.4.160.0060.00916.29
7.4.150.0050.01117.40
7.4.140.0110.00517.20
7.4.130.0090.00916.64
7.4.120.0070.00916.59
7.4.110.0080.01116.54
7.4.100.0090.01216.53
7.4.90.0120.00616.55
7.4.80.0000.01619.03
7.4.70.0090.01216.49
7.4.60.0040.01816.43
7.4.50.0030.00516.40
7.4.40.0040.01422.27
7.4.30.0110.00416.60
7.4.00.0110.00515.03
7.3.330.0030.00313.12
7.3.320.0000.00513.10
7.3.310.0080.00016.26
7.3.300.0030.00316.36
7.3.290.0110.00416.43
7.3.280.0020.01516.38
7.3.270.0160.00317.40
7.3.260.0100.01218.24
7.3.250.0120.00916.48
7.3.240.0090.01016.23
7.3.230.0100.00716.50
7.3.210.0100.00716.29
7.3.200.0040.01719.39
7.3.190.0070.01016.43
7.3.180.0050.01616.33
7.3.170.0090.00916.41
7.3.160.0000.01616.34
7.3.120.0080.00614.89
7.3.110.0030.01414.77
7.3.100.0040.00714.50
7.3.90.0140.00014.84
7.3.80.0070.00714.56
7.3.70.0060.00614.60
7.3.60.0040.01214.85
7.3.50.0040.01214.78
7.3.40.0110.00414.61
7.3.30.0060.00914.77
7.3.20.0110.00016.59
7.3.10.0060.00916.57
7.3.00.0100.00016.76
7.2.330.0080.01316.74
7.2.320.0150.00616.85
7.2.310.0130.00416.40
7.2.300.0100.00716.70
7.2.290.0110.00616.40
7.2.250.0000.01614.68
7.2.240.0070.01315.04
7.2.230.0110.00714.76
7.2.220.0040.00714.95
7.2.210.0120.00415.13
7.2.200.0040.01115.06
7.2.190.0100.00015.20
7.2.180.0070.01014.98
7.2.170.0100.00615.16
7.2.00.0060.01219.54
7.1.330.0040.01115.70
7.1.320.0030.01215.71
7.1.310.0060.00315.92
7.1.300.0030.01015.74
7.1.290.0060.00915.73
7.1.280.0090.00615.75
7.1.270.0080.00515.85
7.1.260.0000.00815.80
7.1.100.0060.00618.14
7.1.70.0040.01116.66
7.1.60.0120.01219.40
7.1.50.0090.01316.96
7.1.00.0030.04022.35
7.0.200.0220.00316.53
7.0.140.0000.07722.09
7.0.60.0070.08719.88
7.0.50.0070.08717.70
7.0.40.0130.08020.14
7.0.30.0270.05320.06
7.0.20.0170.04720.08
7.0.10.0270.08320.10
7.0.00.0070.08320.29
5.6.280.0070.07020.93
5.6.210.0100.07320.70
5.6.200.0100.08018.25
5.6.190.0100.08320.61
5.6.180.0200.06720.49
5.6.170.0230.08020.39
5.6.160.0000.04320.64
5.6.150.0070.08318.15
5.6.140.0070.08318.16
5.6.130.0030.05318.16
5.6.120.0030.08320.98
5.6.110.0130.08021.16
5.6.100.0030.08321.01
5.6.90.0070.08021.04
5.6.80.0000.08320.54
5.6.70.4400.03720.38
5.5.350.4000.04320.40
5.5.340.0130.08017.95
5.5.330.0230.06720.40
5.5.320.0170.08020.13
5.5.310.0300.06320.26
5.5.300.0000.05317.99
5.5.290.0130.07318.01
5.5.280.0030.04320.81
5.5.270.0000.04320.98
5.5.260.0070.04020.65
5.5.250.0100.04720.59
5.5.240.0130.07320.20
5.4.450.1700.05019.08
5.4.440.1600.04019.31
5.4.430.1670.04019.07
5.4.420.1770.04019.23
5.4.410.1530.04019.10
5.4.400.1770.04719.21
5.4.390.1430.04018.75
5.4.380.1500.05019.03
5.4.370.1430.04318.99
5.4.360.1530.03018.88
5.4.350.1700.05019.08
5.4.340.1470.04018.86
5.4.320.1700.05018.91
5.4.310.1830.04319.03
5.4.300.1930.04018.90
5.4.290.1600.04019.23
5.4.280.1570.03319.03
5.4.270.1030.04019.00
5.4.260.1000.03319.21
5.4.250.0000.04019.11
5.4.240.0000.04018.99
5.4.230.1130.03719.20
5.4.220.1430.03319.05
5.4.210.1370.03718.74
5.4.200.1400.03718.74
5.4.190.1470.03319.14
5.4.180.1500.03718.85
5.4.170.1430.03718.97
5.4.160.1500.04018.88
5.4.150.1270.04018.76
5.4.140.1530.03316.33
5.4.130.1600.02716.37
5.4.120.1470.04316.27
5.4.110.1470.03716.54
5.4.100.1470.03716.45
5.4.90.1530.03016.54
5.4.80.1700.04016.45
5.4.70.1500.03716.45
5.4.60.1570.04716.52
5.4.50.1430.04016.33
5.4.40.1370.03716.38
5.4.30.1630.03316.52
5.4.20.1270.03716.51
5.4.10.1370.03316.18
5.4.00.1600.03315.95
5.3.290.1570.03714.59
5.3.280.1430.03314.72
5.3.270.1400.04014.73
5.3.260.1800.04014.55
5.3.250.1500.04314.67
5.3.240.1370.03314.59
5.3.230.1570.03314.72
5.3.220.1530.03714.72
5.3.210.1630.05014.55
5.3.200.1530.03714.80
5.3.190.1570.03314.82
5.3.180.1770.04714.48
5.3.170.1800.04014.55
5.3.160.1530.03714.80
5.3.150.1700.03014.80
5.3.140.1830.04014.54
5.3.130.1570.03314.78
5.3.120.1730.04314.46
5.3.110.1500.04314.57
5.3.100.1570.03314.27
5.3.90.1800.04713.93
5.3.80.1830.04313.93
5.3.70.1700.03713.93
5.3.60.1570.04714.03
5.3.50.1630.03314.04
5.3.40.1630.03714.07
5.3.30.1600.04313.93
5.3.20.1770.04013.70
5.3.10.1770.04713.89
5.3.00.1700.04313.68
5.2.170.1430.03011.11
5.2.160.1430.04311.16
5.2.150.1470.03011.28
5.2.140.1500.03711.21
5.2.130.1430.03011.23
5.2.120.1500.03711.18
5.2.110.1400.03711.04
5.2.100.1470.03311.26
5.2.90.1370.03311.02
5.2.80.1430.03711.18
5.2.70.1500.03311.33
5.2.60.1270.04011.15
5.2.50.1500.04310.98
5.2.40.1230.03310.92
5.2.30.0970.03011.05
5.2.20.1630.03710.87
5.2.10.1330.03311.09
5.2.00.1230.03010.58
5.1.60.1130.0209.98
5.1.50.1000.02310.25
5.1.40.1030.0209.92
5.1.30.1030.02310.46
5.1.20.1200.03710.43
5.1.10.1170.02710.17
5.1.00.1230.0339.97
5.0.50.0600.0238.54
5.0.40.0700.0238.36
5.0.30.0500.0308.40
5.0.20.0500.0208.30
5.0.10.0630.0308.16
5.0.00.0600.0308.17
4.4.90.0670.0277.93
4.4.80.0630.0237.93
4.4.70.0600.0177.93
4.4.60.0730.0277.93
4.4.50.0670.0137.93
4.4.40.0530.0307.93
4.4.30.0700.0207.93
4.4.20.0700.0237.93
4.4.10.0530.0137.93
4.4.00.0670.0337.93
4.3.110.0670.0237.93
4.3.100.0530.0137.93
4.3.90.0600.0137.93
4.3.80.0630.0277.93
4.3.70.0630.0277.93
4.3.60.0670.0207.93
4.3.50.0570.0237.93
4.3.40.0570.0177.93
4.3.30.0230.0177.93
4.3.20.0330.0307.93
4.3.10.0300.0277.93
4.3.00.0230.0207.93

preferences:
37.13 ms | 401 KiB | 5 Q