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; $obj['abc'] = 123; var_dump($obj);

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.0110.01118.56
8.3.50.0230.01021.33
8.3.40.0170.00318.84
8.3.30.0100.00320.30
8.3.20.0050.00220.28
8.3.10.0040.00421.90
8.3.00.0090.00022.15
8.2.180.0150.00617.00
8.2.170.0140.00322.96
8.2.160.0100.00322.08
8.2.150.0100.00624.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0050.00320.80
8.2.110.0030.00622.25
8.2.100.0100.00317.84
8.2.90.0060.00317.63
8.2.80.0060.00318.05
8.2.70.0040.00418.16
8.2.60.0090.00018.16
8.2.50.0000.00818.10
8.2.40.0060.00319.46
8.2.30.0000.00919.47
8.2.20.0000.00717.60
8.2.10.0000.00817.75
8.2.00.0030.00517.73
8.1.280.0140.00725.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0080.00023.82
8.1.230.0140.00022.17
8.1.220.0080.00017.77
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00917.38
8.1.180.0040.00418.10
8.1.170.0030.00518.54
8.1.160.0000.00718.91
8.1.150.0040.00418.56
8.1.140.0040.00417.52
8.1.130.0040.00417.74
8.1.120.0000.00717.53
8.1.110.0000.00717.46
8.1.100.0000.00817.39
8.1.90.0030.00317.40
8.1.80.0040.00417.36
8.1.70.0070.00017.36
8.1.60.0060.00317.58
8.1.50.0040.00417.58
8.1.40.0040.00417.39
8.1.30.0070.00017.61
8.1.20.0080.00017.69
8.1.10.0050.00217.43
8.1.00.0000.00717.45
8.0.300.0070.00019.73
8.0.290.0070.00316.63
8.0.280.0000.00718.30
8.0.270.0000.00717.27
8.0.260.0030.00316.82
8.0.250.0000.00716.95
8.0.240.0060.00316.98
8.0.230.0000.00816.81
8.0.220.0030.00316.84
8.0.210.0040.00416.83
8.0.200.0000.00616.96
8.0.190.0000.00716.86
8.0.180.0000.00816.91
8.0.170.0040.00416.85
8.0.160.0070.00016.96
8.0.150.0020.00516.95
8.0.140.0040.00416.89
8.0.130.0000.00613.29
8.0.120.0040.00416.79
8.0.110.0080.00316.93
8.0.100.0070.00016.73
8.0.90.0040.00416.76
8.0.80.0090.00616.90
8.0.70.0000.00716.89
8.0.60.0000.00816.74
8.0.50.0000.00716.89
8.0.30.0120.00617.00
8.0.20.0100.00817.40
8.0.10.0040.00417.11
8.0.00.0140.00816.80
7.4.330.0000.00516.79
7.4.320.0000.00616.41
7.4.300.0000.00616.61
7.4.290.0070.00016.62
7.4.280.0030.00316.50
7.4.270.0040.00416.56
7.4.260.0030.00313.35
7.4.250.0040.00416.50
7.4.240.0030.00416.51
7.4.230.0070.00016.72
7.4.220.0100.01616.55
7.4.210.0060.00916.58
7.4.200.0030.00316.41
7.4.190.0070.00016.43
7.4.160.0210.00316.40
7.4.150.0060.01217.40
7.4.140.0090.01117.86
7.4.130.0090.00816.41
7.4.120.0080.01016.50
7.4.110.0090.00916.31
7.4.100.0130.00816.49
7.4.90.0040.01316.52
7.4.80.0100.00719.39
7.4.70.0120.00716.49
7.4.60.0030.01516.48
7.4.50.0050.00316.78
7.4.40.0140.00022.77
7.4.30.0140.00916.46
7.4.10.0070.01115.08
7.4.00.0070.01114.90
7.3.330.0000.00513.38
7.3.320.0030.00313.31
7.3.310.0040.00416.32
7.3.300.0000.00716.41
7.3.290.0110.00416.35
7.3.280.0090.00916.40
7.3.270.0000.01817.40
7.3.260.0130.00616.59
7.3.250.0130.00816.55
7.3.240.0080.00816.39
7.3.230.0140.00316.63
7.3.210.0080.01116.33
7.3.200.0120.00819.39
7.3.190.0170.00616.30
7.3.180.0110.00716.48
7.3.170.0040.01216.39
7.3.160.0120.00916.48
7.3.130.0070.01015.10
7.3.120.0100.00715.02
7.3.110.0050.01214.91
7.3.100.0070.00814.73
7.3.90.0090.00914.86
7.3.80.0050.00714.68
7.3.70.0050.00814.73
7.3.60.0050.00714.74
7.3.50.0030.00714.94
7.3.40.0050.00814.71
7.3.30.0060.00714.84
7.3.20.0070.00616.61
7.3.10.0050.00716.73
7.3.00.0080.00616.57
7.2.330.0130.00716.52
7.2.320.0060.01616.75
7.2.310.0120.00916.44
7.2.300.0100.00716.53
7.2.290.0000.01616.58
7.2.260.0090.00915.31
7.2.250.0090.00915.25
7.2.240.0070.01015.12
7.2.230.0080.00715.10
7.2.220.0050.01015.12
7.2.210.0070.00915.05
7.2.200.0060.01015.06
7.2.190.0060.00815.17
7.2.180.0080.00514.95
7.2.170.0060.00815.06
7.2.160.0030.00614.99
7.2.150.0030.00916.92
7.2.140.0030.00717.00
7.2.130.0050.00616.96
7.2.120.0020.01116.87
7.2.110.0060.00616.81
7.2.100.0080.00316.90
7.2.90.0040.00716.87
7.2.80.0050.00617.00
7.2.70.0050.00816.94
7.2.60.0050.00616.94
7.2.50.0090.00416.97
7.2.40.0040.00916.96
7.2.30.0030.01116.64
7.2.20.0070.00716.81
7.2.10.0120.00317.03
7.2.00.0020.01117.80
7.1.330.0060.00815.77
7.1.320.0090.00415.98
7.1.310.0110.00315.82
7.1.300.0010.00915.69
7.1.290.0080.00615.63
7.1.280.0030.01015.66
7.1.270.0020.01415.69
7.1.260.0090.00215.93
7.1.250.0060.00815.86
7.1.240.0070.00415.93
7.1.230.0030.01015.80
7.1.220.0070.01015.83
7.1.210.0040.01115.55
7.1.200.0000.01315.64
7.1.190.0030.00915.93
7.1.180.0000.01515.83
7.1.170.0030.01015.75
7.1.160.0030.01115.94
7.1.150.0100.00315.68
7.1.140.0030.00615.83
7.1.130.0090.00315.96
7.1.120.0060.00616.02
7.1.110.0060.00315.89
7.1.100.0060.00816.91
7.1.90.0000.01315.87
7.1.80.0120.00315.93
7.1.70.0030.00716.48
7.1.60.0110.00617.62
7.1.50.0100.00716.48
7.1.40.0030.01115.91
7.1.30.0030.00615.91
7.1.20.0030.00616.05
7.1.10.0040.01115.81
7.1.00.0030.03519.07
7.0.330.0000.01115.44
7.0.320.0030.01015.29
7.0.310.0080.00615.57
7.0.300.0070.00715.19
7.0.290.0070.00715.44
7.0.280.0040.00715.46
7.0.270.0050.00315.27
7.0.260.0030.01015.24
7.0.250.0030.00715.52
7.0.240.0040.00415.60
7.0.230.0110.00415.44
7.0.220.0060.00615.36
7.0.210.0040.00415.25
7.0.200.0050.00716.05
7.0.190.0080.00415.53
7.0.180.0080.00015.26
7.0.170.0040.01115.52
7.0.160.0050.00515.57
7.0.150.0040.01115.40
7.0.140.0050.03418.72
7.0.130.0030.00515.37
7.0.120.0030.00615.35
7.0.110.0060.00615.41
7.0.100.0070.02517.74
7.0.90.0120.04617.66
7.0.80.0160.04017.60
7.0.70.0020.04817.80
7.0.60.0160.04317.74
7.0.50.0130.02717.91
7.0.40.0050.04516.83
7.0.30.0070.04516.73
7.0.20.0050.03416.78
7.0.10.0000.03216.78
7.0.00.0070.02616.80
5.6.400.0040.00814.17
5.6.390.0090.00614.61
5.6.380.0080.00614.73
5.6.370.0060.00914.61
5.6.360.0000.01014.55
5.6.350.0070.00714.37
5.6.340.0030.00914.50
5.6.330.0030.01014.47
5.6.320.0090.00614.41
5.6.310.0000.00914.46
5.6.300.0040.01114.55
5.6.290.0040.00414.72
5.6.280.0080.03617.58
5.6.270.0060.00614.42
5.6.260.0000.01414.51
5.6.250.0020.03317.34
5.6.240.0050.02617.53
5.6.230.0070.02717.56
5.6.220.0100.03517.64
5.6.210.0050.03817.54
5.6.200.0080.04217.71
5.6.190.0060.03617.74
5.6.180.0100.03317.77
5.6.170.0100.02717.74
5.6.160.0020.02717.68
5.6.150.0050.04217.83
5.6.140.0070.04317.65
5.6.130.0070.04817.66
5.6.120.0050.04617.83
5.6.110.0050.05117.69
5.6.100.0050.02717.75
5.6.90.0080.04317.86
5.6.80.0020.03517.46
5.6.70.0070.03017.44
5.6.60.0070.04217.44
5.6.50.0020.04117.43
5.6.40.0060.02117.42
5.6.30.0050.04517.30
5.6.20.0050.03317.35
5.6.10.0100.02217.49
5.6.00.0030.03917.41
5.5.380.0130.03717.55
5.5.370.0070.04317.22
5.5.360.0080.04017.31
5.5.350.0090.04217.47
5.5.340.0000.04217.65
5.5.330.0040.03117.50
5.5.320.0080.02517.54
5.5.310.0050.04817.63
5.5.300.0090.03217.56
5.5.290.0040.04417.66
5.5.280.0100.04217.55
5.5.270.0070.04017.68
5.5.260.0070.03717.51
5.5.250.0060.03617.39
5.5.240.0140.03817.36
5.5.230.0050.04917.16
5.5.220.0120.02217.10
5.5.210.0050.04117.32
5.5.200.0060.04317.32
5.5.190.0080.02517.38
5.5.180.0080.04217.31
5.5.170.0000.00914.28
5.5.160.0070.04517.30
5.5.150.0120.03517.17
5.5.140.0070.04417.31
5.5.130.0080.03917.26
5.5.120.0060.02817.16
5.5.110.0050.04517.34
5.5.100.0110.03017.13
5.5.90.0050.02717.28
5.5.80.0060.03317.22
5.5.70.0070.03917.28
5.5.60.0050.02617.00
5.5.50.0150.03517.35
5.5.40.0040.04517.25
5.5.30.0060.04317.25
5.5.20.0060.04317.10
5.5.10.0070.03617.20
5.5.00.0050.04317.20
5.4.450.0060.04015.54
5.4.440.0120.03815.51
5.4.430.0020.02515.58
5.4.420.0080.02015.41
5.4.410.0050.02815.49
5.4.400.0030.04315.27
5.4.390.0050.02815.30
5.4.380.0120.01815.26
5.4.370.0100.03315.34
5.4.360.0050.03515.42
5.4.350.0050.03115.41
5.4.340.0090.04015.43
5.4.330.0030.00611.66
5.4.320.0050.03015.35
5.4.310.0030.04715.43
5.4.300.0070.04115.26
5.4.290.0030.03815.39
5.4.280.0070.03715.39
5.4.270.0030.03015.39
5.4.260.0080.03715.36
5.4.250.0090.03815.34
5.4.240.0020.04115.34
5.4.230.0080.03715.34
5.4.220.0050.03015.44
5.4.210.0060.02515.42
5.4.200.0060.02315.34
5.4.190.0060.04215.40
5.4.180.0060.02215.34
5.4.170.0040.04015.39
5.4.160.0030.02715.39
5.4.150.0030.04015.33
5.4.140.0080.02714.06
5.4.130.0050.03614.07
5.4.120.0050.03513.98
5.4.110.0020.03813.96
5.4.100.0020.04514.06
5.4.90.0050.03114.02
5.4.80.0050.04014.06
5.4.70.0020.04413.96
5.4.60.0050.04314.06
5.4.50.0120.03814.06
5.4.40.0080.03714.01
5.4.30.0020.04213.97
5.4.20.0050.04314.03
5.4.10.0030.04314.05
5.4.00.0070.02813.79
5.3.290.0070.03913.22
5.3.280.0030.03213.13
5.3.270.0070.02713.16
5.3.260.0080.02813.12
5.3.250.0030.04313.13
5.3.240.0000.03313.13
5.3.230.0080.03713.19
5.3.220.0070.04013.15
5.3.210.0060.02813.09
5.3.200.0060.03813.10
5.3.190.0080.03713.12
5.3.180.0030.03213.07
5.3.170.0020.04613.10
5.3.160.0060.02313.18
5.3.150.0060.03313.19
5.3.140.0080.03813.12
5.3.130.0050.03013.12
5.3.120.0050.04113.11
5.3.110.0030.03513.17
5.3.100.0030.04212.82
5.3.90.0050.02712.88
5.3.80.0020.04312.85
5.3.70.0100.03712.85
5.3.60.0080.03212.86
5.3.50.0070.03812.83
5.3.40.0070.03312.76
5.3.30.0050.04312.84
5.3.20.0060.01812.68
5.3.10.0070.02812.60
5.3.00.0060.04212.69
5.2.170.0030.04311.14
5.2.160.0070.06011.29
5.2.150.0100.03011.17
5.2.140.0100.06011.01
5.2.130.0070.05711.25
5.2.120.0070.04011.14
5.2.110.0100.05711.10
5.2.100.0030.04711.17
5.2.90.0100.04311.21
5.2.80.0100.06311.16
5.2.70.0130.05311.17
5.2.60.0030.04011.18
5.2.50.0070.06311.09
5.2.40.0130.06010.91
5.2.30.0000.03710.84
5.2.20.0030.05010.98
5.2.10.0000.04010.84
5.2.00.0000.05710.83
5.1.60.0070.03710.17
5.1.50.0000.03310.17
5.1.40.0070.05010.17
5.1.30.0000.06010.41
5.1.20.0100.02310.45
5.1.10.0100.04710.17
5.1.00.0100.05010.17
5.0.50.0100.02710.17
5.0.40.0030.04010.17
5.0.30.0070.06710.17
5.0.20.0070.04310.17
5.0.10.0070.04710.17
5.0.00.0130.02710.17
4.4.90.0000.04010.17
4.4.80.0030.03010.17
4.4.70.0070.01710.17
4.4.60.0000.03010.17
4.4.50.0030.03310.17
4.4.40.0000.04010.17
4.4.30.0000.02310.17
4.4.20.0030.03310.17
4.4.10.0030.04010.17
4.4.00.0070.04710.17
4.3.110.0030.03310.17
4.3.100.0030.03310.17
4.3.90.0000.03710.17
4.3.80.0030.05310.17
4.3.70.0000.03710.17
4.3.60.0070.02710.17
4.3.50.0030.03710.17
4.3.40.0000.05310.17
4.3.30.0030.03310.17
4.3.20.0030.03710.17
4.3.10.0030.03310.17
4.3.00.0030.02710.17

preferences:
50.57 ms | 401 KiB | 5 Q