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; print_r($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.0040.01518.43
8.3.50.0130.00516.44
8.3.40.0060.00918.82
8.3.30.0060.00918.70
8.3.20.0040.00418.73
8.3.10.0080.00020.48
8.3.00.0070.00417.46
8.2.180.0120.00618.54
8.2.170.0180.00322.96
8.2.160.0070.00722.26
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0080.00419.95
8.2.110.0060.00319.30
8.2.100.0060.00617.78
8.2.90.0080.00019.23
8.2.80.0000.00918.05
8.2.70.0100.00317.25
8.2.60.0080.00317.93
8.2.50.0040.00418.07
8.2.40.0050.00318.22
8.2.30.0040.00418.19
8.2.20.0030.00517.60
8.2.10.0040.00417.76
8.2.00.0000.00817.83
8.1.280.0150.00625.92
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00621.77
8.1.230.0030.00920.90
8.1.220.0050.00318.68
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0000.00717.52
8.1.180.0000.00818.10
8.1.170.0000.00820.73
8.1.160.0000.00818.94
8.1.150.0050.00218.58
8.1.140.0050.00217.36
8.1.130.0030.00317.79
8.1.120.0000.00717.32
8.1.110.0000.00717.38
8.1.100.0080.00017.49
8.1.90.0000.00717.38
8.1.80.0070.00017.51
8.1.70.0030.00317.46
8.1.60.0040.00417.63
8.1.50.0060.00317.53
8.1.40.0030.00517.42
8.1.30.0050.00317.61
8.1.20.0040.00417.54
8.1.10.0000.00817.54
8.1.00.0000.00817.45
8.0.300.0000.00720.02
8.0.290.0060.00316.75
8.0.280.0030.00318.46
8.0.270.0070.00017.31
8.0.260.0000.00818.64
8.0.250.0070.00016.97
8.0.240.0080.00017.00
8.0.230.0030.00316.84
8.0.220.0030.00316.85
8.0.210.0070.00016.91
8.0.200.0060.00016.98
8.0.190.0060.00316.87
8.0.180.0050.00316.82
8.0.170.0100.00016.91
8.0.160.0030.00616.96
8.0.150.0000.00916.82
8.0.140.0070.00616.88
8.0.130.0000.00613.40
8.0.120.0000.00816.91
8.0.110.0000.00716.70
8.0.100.0000.00717.01
8.0.90.0050.00516.87
8.0.80.0080.00716.88
8.0.70.0030.00616.93
8.0.60.0040.00416.96
8.0.50.0040.00416.83
8.0.30.0110.00817.10
8.0.20.0140.00617.09
8.0.10.0000.00816.91
8.0.00.0130.00816.78
7.4.330.0030.00314.77
7.4.320.0000.00816.59
7.4.300.0030.00316.51
7.4.290.0000.00716.61
7.4.280.0060.00316.65
7.4.270.0080.00016.61
7.4.260.0030.00313.28
7.4.250.0030.00516.52
7.4.240.0040.00416.60
7.4.230.0030.00316.59
7.4.220.0110.00716.39
7.4.210.0080.00816.55
7.4.200.0030.00316.61
7.4.190.0070.00016.48
7.4.160.0060.01116.58
7.4.150.0100.01017.07
7.4.140.0120.00917.29
7.4.130.0070.01116.46
7.4.120.0080.01216.60
7.4.110.0110.00716.47
7.4.100.0080.00916.24
7.4.90.0090.01216.49
7.4.80.0070.01118.80
7.4.70.0120.00616.62
7.4.60.0100.00616.52
7.4.50.0050.00016.32
7.4.40.0090.00622.27
7.4.30.0090.00916.58
7.4.00.0060.01214.98
7.3.330.0040.00313.38
7.3.320.0030.00313.17
7.3.310.0050.00216.42
7.3.300.0030.00316.23
7.3.290.0070.01116.36
7.3.280.0120.00516.33
7.3.270.0130.00617.07
7.3.260.0110.00618.24
7.3.250.0070.01016.49
7.3.240.0130.00316.59
7.3.230.0100.00716.41
7.3.210.0060.01016.53
7.3.200.0110.00619.39
7.3.190.0100.01316.48
7.3.180.0080.00816.55
7.3.170.0030.01316.36
7.3.160.0130.00716.37
7.3.120.0090.00814.82
7.3.110.0090.00914.99
7.3.100.0060.00914.91
7.3.90.0070.00514.99
7.3.80.0080.00414.70
7.3.70.0030.00814.84
7.3.60.0060.00614.89
7.3.50.0060.00614.99
7.3.40.0020.01114.87
7.3.30.0110.00314.72
7.3.20.0050.00716.70
7.3.10.0000.01016.68
7.3.00.0020.01016.71
7.2.330.0100.00716.59
7.2.320.0030.01216.70
7.2.310.0150.00316.72
7.2.300.0030.01416.73
7.2.290.0130.00316.74
7.2.250.0050.01314.95
7.2.240.0130.00614.91
7.2.230.0080.00715.18
7.2.220.0030.01015.01
7.2.210.0030.01015.04
7.2.200.0100.00315.22
7.2.190.0050.00915.13
7.2.180.0050.00815.10
7.2.170.0070.00515.12
7.2.00.0060.00919.52
7.1.330.0050.00815.85
7.1.320.0070.00415.85
7.1.310.0020.01015.72
7.1.300.0060.00615.90
7.1.290.0070.00415.95
7.1.280.0070.00615.82
7.1.270.0120.00315.53
7.1.260.0040.00615.58
7.1.100.0090.00317.79
7.1.70.0060.00617.18
7.1.60.0170.00019.40
7.1.50.0060.01317.02
7.1.00.0030.07722.45
7.0.200.0000.00916.47
7.0.140.0030.06322.15
7.0.60.0200.07019.94
7.0.50.0100.07717.73
7.0.40.0070.04720.11
7.0.30.0530.07020.07
7.0.20.0330.05320.12
7.0.10.0270.04720.15
7.0.00.0030.04320.12
5.6.280.0000.07721.02
5.6.210.0170.06720.62
5.6.200.0030.04318.22
5.6.190.0000.06320.50
5.6.180.0300.08020.49
5.6.170.0470.06320.71
5.6.160.0100.07720.70
5.6.150.0070.08018.18
5.6.140.0100.06718.23
5.6.130.0000.05018.18
5.6.120.0200.06321.15
5.6.110.0000.04321.03
5.6.100.0030.04021.11
5.6.90.0070.04720.98
5.6.80.0070.04720.55
5.6.70.4430.04020.51
5.5.350.0200.04020.30
5.5.340.0100.05317.96
5.5.330.0100.08320.31
5.5.320.0330.07320.21
5.5.310.0270.08020.34
5.5.300.0100.07718.07
5.5.290.0100.05717.97
5.5.280.0100.06020.98
5.5.270.0000.05720.77
5.5.260.0070.06720.84
5.5.250.0130.06320.59
5.5.240.0000.05720.16
5.4.450.3600.03719.20
5.4.440.2330.04019.64
5.4.430.2500.04019.46
5.4.420.3400.03019.43
5.4.410.3430.03719.51
5.4.400.3700.04018.89
5.4.390.2870.04319.09
5.4.380.3270.03319.14
5.4.370.2970.04019.24
5.4.360.2830.04019.08
5.4.350.2900.04018.99
5.4.340.1970.03718.98
5.4.320.2730.03719.24
5.4.310.2430.03718.94
5.4.300.3130.04019.05
5.4.290.2070.03319.05
5.4.280.2900.04719.24
5.4.270.3230.04019.31
5.4.260.2900.03718.94
5.4.250.2430.03719.21
5.4.240.3070.03719.21
5.4.230.2600.02719.30
5.4.220.3900.03719.22
5.4.210.3270.04019.23
5.4.200.3130.04018.98
5.4.190.2970.03719.14
5.4.180.3130.04018.82
5.4.170.2800.04319.20
5.4.160.3270.03318.97
5.4.150.3200.03719.14
5.4.140.3300.03316.36
5.4.130.2970.03316.45
5.4.120.2970.03716.38
5.4.110.3630.03316.46
5.4.100.3700.03316.54
5.4.90.3230.04016.27
5.4.80.3130.03716.44
5.4.70.3230.03716.39
5.4.60.3230.03716.43
5.4.50.3200.03716.53
5.4.40.3070.03716.54
5.4.30.2470.03716.28
5.4.20.3270.03316.38
5.4.10.3630.03316.58
5.4.00.3100.03315.86
5.3.290.2000.03714.85
5.3.280.3670.03714.67
5.3.270.2900.02714.58
5.3.260.3500.03314.69
5.3.250.3570.03314.58
5.3.240.3370.03014.61
5.3.230.3030.03314.61
5.3.220.3800.03314.49
5.3.210.3630.04014.48
5.3.200.2970.04014.50
5.3.190.3770.03314.48
5.3.180.3400.04014.47
5.3.170.2930.03714.57
5.3.160.3070.03314.55
5.3.150.3500.03314.57
5.3.140.2800.04014.62
5.3.130.3730.04014.56
5.3.120.3930.03714.63
5.3.110.3030.03714.72
5.3.100.2430.04013.96
5.3.90.3570.03714.04
5.3.80.3300.04014.03
5.3.70.3970.04013.95
5.3.60.3570.03713.95
5.3.50.3130.04013.89
5.3.40.3230.03313.87
5.3.30.3700.03313.97
5.3.20.3070.04013.77
5.3.10.4000.04013.58
5.3.00.4130.03313.55
5.2.170.2500.03711.05
5.2.160.2470.03311.07
5.2.150.3170.02311.38
5.2.140.2630.02311.07
5.2.130.2600.03011.03
5.2.120.3300.03011.23
5.2.110.3600.03011.02
5.2.100.2430.02311.16
5.2.90.2830.02710.98
5.2.80.3400.03311.04
5.2.70.3300.03011.26
5.2.60.2730.02710.97
5.2.50.2070.03010.95
5.2.40.2300.02311.09
5.2.30.2130.03010.89
5.2.20.2500.02310.98
5.2.10.2900.02710.80
5.2.00.2800.02710.70
5.1.60.2330.0209.94
5.1.50.1570.0309.99
5.1.40.2330.0239.90
5.1.30.2200.02710.40
5.1.20.2130.03310.27
5.1.10.2130.0239.98
5.1.00.2530.02710.00
5.0.50.1200.0208.60
5.0.40.0730.0238.60
5.0.30.1200.0378.60
5.0.20.1500.0238.60
5.0.10.1530.0238.60
5.0.00.1230.0308.60
4.4.90.1570.0138.60
4.4.80.1600.0178.60
4.4.70.1570.0178.60
4.4.60.1630.0238.60
4.4.50.1630.0138.60
4.4.40.1030.0278.60
4.4.30.1270.0208.60
4.4.20.1070.0238.60
4.4.10.1600.0208.60
4.4.00.1000.0238.60
4.3.110.1200.0238.60
4.3.100.1530.0178.60
4.3.90.0730.0178.60
4.3.80.1130.0278.60
4.3.70.1230.0108.60
4.3.60.1400.0178.60
4.3.50.1400.0138.60
4.3.40.1230.0208.60
4.3.30.0430.0278.60
4.3.20.0770.0178.60
4.3.10.0500.0308.60
4.3.00.0830.0138.60

preferences:
44.15 ms | 400 KiB | 5 Q