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) { var_dump($offset); die; if (empty($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 = 'Append 1'; 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.70.0070.01116.88
8.3.60.0040.01118.55
8.3.50.0120.00721.27
8.3.40.0120.00318.76
8.3.30.0100.00720.34
8.3.20.0070.00020.16
8.3.10.0040.00422.06
8.3.00.0080.00022.46
8.2.180.0060.00916.50
8.2.170.0080.00822.96
8.2.160.0070.00722.22
8.2.150.0070.00724.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0000.00819.66
8.2.110.0080.00020.52
8.2.100.0060.00617.78
8.2.90.0000.00819.08
8.2.80.0090.00019.21
8.2.70.0060.00317.63
8.2.60.0060.00317.93
8.2.50.0090.00018.07
8.2.40.0000.00818.15
8.2.30.0030.00619.43
8.2.20.0040.00417.59
8.2.10.0030.00617.71
8.2.00.0060.00317.84
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00623.78
8.1.230.0080.00320.87
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.25
8.1.190.0080.00017.42
8.1.180.0030.00618.10
8.1.170.0040.00418.48
8.1.160.0030.00618.77
8.1.150.0090.00018.53
8.1.140.0040.00417.51
8.1.130.0020.00517.84
8.1.120.0050.00217.36
8.1.110.0040.00417.42
8.1.100.0040.00417.46
8.1.90.0040.00417.50
8.1.80.0080.00017.43
8.1.70.0000.00717.43
8.1.60.0040.00417.62
8.1.50.0000.00817.48
8.1.40.0060.00617.39
8.1.30.0030.00617.53
8.1.20.0000.00717.70
8.1.10.0040.00417.46
8.1.00.0030.00617.34
8.0.300.0070.00018.77
8.0.290.0020.00517.30
8.0.280.0070.00018.46
8.0.270.0030.00517.27
8.0.260.0000.00716.83
8.0.250.0030.00316.90
8.0.240.0000.00817.02
8.0.230.0070.00016.97
8.0.220.0000.00716.79
8.0.210.0030.00316.88
8.0.200.0000.00616.94
8.0.190.0000.00716.95
8.0.180.0070.00016.93
8.0.170.0040.00416.98
8.0.160.0000.00716.95
8.0.150.0040.00416.87
8.0.140.0040.00416.75
8.0.130.0030.00313.36
8.0.120.0040.00416.89
8.0.110.0040.00416.72
8.0.100.0040.00416.70
8.0.90.0000.00716.91
8.0.80.0120.00616.87
8.0.70.0040.00416.86
8.0.60.0040.00416.77
8.0.50.0040.00416.80
8.0.30.0100.01016.95
8.0.20.0120.00817.40
8.0.10.0040.00417.09
8.0.00.0120.01216.69
7.4.330.0020.00216.71
7.4.320.0030.00316.63
7.4.300.0030.00316.46
7.4.290.0070.00016.58
7.4.280.0000.00716.52
7.4.270.0000.00716.51
7.4.260.0000.00513.28
7.4.250.0040.00416.57
7.4.240.0040.00416.55
7.4.230.0070.00016.49
7.4.220.0130.01316.64
7.4.210.0060.00816.60
7.4.200.0030.00316.59
7.4.190.0000.00716.68
7.4.160.0030.01316.37
7.4.150.0060.01317.40
7.4.140.0140.00317.86
7.4.130.0080.01116.58
7.4.120.0130.00416.57
7.4.110.0100.00716.48
7.4.100.0160.00916.64
7.4.90.0130.00316.50
7.4.80.0080.01119.39
7.4.70.0100.00716.23
7.4.60.0060.01016.47
7.4.50.0080.00016.61
7.4.40.0080.00822.77
7.4.30.0140.00416.54
7.4.00.0030.01014.88
7.3.330.0030.00313.08
7.3.320.0000.00713.30
7.3.310.0000.00616.14
7.3.300.0030.00316.34
7.3.290.0030.01016.27
7.3.280.0090.00916.31
7.3.270.0070.01017.40
7.3.260.0070.01116.25
7.3.250.0100.00916.37
7.3.240.0140.00316.53
7.3.230.0030.01616.63
7.3.210.0140.00316.53
7.3.200.0080.00819.39
7.3.190.0100.00716.42
7.3.180.0030.01316.09
7.3.170.0030.01416.39
7.3.160.0080.01216.31
7.3.120.0070.00714.97
7.2.330.0100.01016.86
7.2.320.0070.01016.65
7.2.310.0100.00716.59
7.2.300.0030.01516.68
7.2.290.0040.01316.69
7.2.00.0000.01419.52
7.1.100.0000.01218.13
7.1.70.0040.00417.26
7.1.60.0030.02119.17
7.1.50.0050.00517.04
7.1.00.0070.03022.35
7.0.200.0030.00716.40
7.0.140.0100.06722.16
7.0.100.0600.06020.08
7.0.90.0530.08319.92
7.0.80.0530.07719.93
7.0.70.0430.08019.89
7.0.60.0430.04319.98
7.0.50.0570.07320.32
7.0.40.0000.08320.05
7.0.30.0030.09019.99
7.0.20.0000.07020.11
7.0.10.0070.05320.14
7.0.00.0070.04320.09
5.6.250.0100.08020.63
5.6.240.0030.05020.51
5.6.230.0070.08020.70
5.6.220.0070.08020.60
5.6.210.0130.07020.57
5.6.200.0070.08021.03
5.6.190.0070.08321.18
5.6.180.0070.08320.96
5.6.170.0130.08321.04
5.6.160.0030.07021.07
5.6.150.0100.06721.04
5.6.140.0070.04721.13
5.6.130.0000.04721.09
5.6.120.0100.03720.95
5.6.110.0070.06721.05
5.6.100.0070.06720.95
5.6.90.0030.04721.10
5.6.80.0000.04720.47
5.6.70.0070.05720.41
5.6.60.0030.06320.39
5.6.50.0130.06720.45
5.6.40.0100.03720.45
5.6.30.0000.04320.42
5.6.20.0000.04720.32
5.6.10.0070.05320.38
5.6.00.0070.04320.32
5.5.380.0170.06720.37
5.5.370.0200.07020.36
5.5.360.0070.05020.42
5.5.350.0070.05020.41
5.5.340.0100.08020.90
5.5.330.0030.08320.74
5.5.320.0230.06320.93
5.5.310.0130.04320.89
5.5.300.0170.03720.74
5.5.290.0030.04320.65
5.5.280.0070.04020.93
5.5.270.0030.04320.91
5.5.260.0070.03720.64
5.5.250.0070.04020.73
5.5.240.0130.05320.22
5.5.230.0070.06320.16
5.5.220.0070.03720.25
5.5.210.0070.05720.22
5.5.200.0030.04720.20
5.5.190.0000.04020.22
5.5.180.0100.04020.20
5.5.160.0000.04720.14
5.5.150.0130.03320.23
5.5.140.0070.03720.26
5.5.130.0100.06320.09
5.5.120.0100.03320.23
5.5.110.0100.04719.98
5.5.100.0130.04320.11
5.5.90.0030.06020.09
5.5.80.0130.04320.13
5.5.70.0070.03720.07
5.5.60.0030.03319.96
5.5.50.0030.03720.06
5.5.40.0130.06020.07
5.5.30.0030.04020.11
5.5.20.0100.04320.14
5.5.10.0000.06320.04
5.5.00.0170.05320.06
5.4.450.0070.03719.37
5.4.440.0070.03719.21
5.4.430.0000.04319.36
5.4.420.0100.03319.45
5.4.410.0000.04019.09
5.4.400.0170.02019.19
5.4.390.0070.05319.13
5.4.380.0030.06319.05
5.4.370.0000.04019.18
5.4.360.0030.03719.13
5.4.350.0100.04019.15
5.4.340.0030.04018.90
5.4.320.0030.03719.05
5.4.310.0030.04719.23
5.4.300.0000.04019.12
5.4.290.0000.04018.88
5.4.280.0100.03719.13
5.4.270.0100.06019.12
5.4.260.0070.04019.23
5.4.250.0070.04019.22
5.4.240.0000.03719.04
5.4.230.0030.03719.12
5.4.220.0030.04018.87
5.4.210.0000.04018.87
5.4.200.0070.04318.89
5.4.190.0070.03018.93
5.4.180.0030.07719.03
5.4.170.0070.03019.15
5.4.160.0000.05718.93
5.4.150.0070.07719.11
5.4.140.0230.05016.14
5.4.130.0000.08016.13
5.4.120.0070.06316.36
5.4.110.0130.07016.51
5.4.100.0130.06716.34
5.4.90.0070.07316.43
5.4.80.0100.05316.38
5.4.70.0100.07316.34
5.4.60.0030.07316.30
5.4.50.0030.05316.46
5.4.40.0070.07716.35
5.4.30.0070.06316.39
5.4.20.0100.07316.26
5.4.10.0070.07316.29
5.4.00.0100.07315.86
5.3.290.0000.04714.73
5.3.280.0070.03314.55
5.3.270.0030.06314.71
5.3.260.0070.07714.71
5.3.250.0070.07714.67
5.3.240.0030.07714.67
5.3.230.0070.07714.54
5.3.220.0030.05014.51
5.3.210.0100.06314.51
5.3.200.0100.06714.61
5.3.190.0030.07314.51
5.3.180.0070.07314.67
5.3.170.0130.06014.66
5.3.160.0000.07714.55
5.3.150.0000.07314.52
5.3.140.0070.07714.50
5.3.130.0030.06314.65
5.3.120.0100.07714.53
5.3.110.0000.08314.55
5.3.100.0100.07014.19
5.3.90.0070.07714.17
5.3.80.0070.08014.09
5.3.70.0070.07313.92
5.3.60.0030.08014.03
5.3.50.0070.04014.06
5.3.40.0070.07013.94
5.3.30.0070.07313.93
5.3.20.0070.07313.65
5.3.10.0170.06313.58
5.3.00.0030.07013.76
5.2.170.0100.05711.22
5.2.160.0070.06011.14
5.2.150.0030.06311.18
5.2.140.0000.06011.04
5.2.130.0030.04011.22
5.2.120.0070.05711.25
5.2.110.0070.06311.18
5.2.100.0000.06311.20
5.2.90.0070.05711.18
5.2.80.0030.05311.02
5.2.70.0030.06011.23
5.2.60.0100.06011.09
5.2.50.0030.06310.89
5.2.40.0100.05310.92
5.2.30.0000.04710.90
5.2.20.0030.06010.91
5.2.10.0030.05710.98
5.2.00.0000.06310.84
5.1.60.0070.0509.89
5.1.50.0030.05310.06
5.1.40.0100.05010.05
5.1.30.0070.05310.27
5.1.20.0030.04010.43
5.1.10.0070.05310.14
5.1.00.0070.03710.18
5.0.50.0070.0438.55
5.0.40.0000.0508.41
5.0.30.0070.0538.34
5.0.20.0070.0408.34
5.0.10.0030.0438.34
5.0.00.0030.0608.34
4.4.90.0030.0378.34
4.4.80.0030.0338.34
4.4.70.0000.0378.34
4.4.60.0000.0408.34
4.4.50.0000.0408.34
4.4.40.0000.0338.34
4.4.30.0000.0408.34
4.4.20.0000.0378.34
4.4.10.0030.0338.34
4.4.00.0070.0538.34
4.3.110.0070.0338.34
4.3.100.0070.0308.34
4.3.90.0000.0378.34
4.3.80.0000.0538.34
4.3.70.0070.0338.34
4.3.60.0030.0338.34
4.3.50.0000.0408.34
4.3.40.0100.0438.34
4.3.30.0070.0308.34
4.3.20.0000.0378.34
4.3.10.0070.0308.34
4.3.00.0000.0338.34

preferences:
46.54 ms | 401 KiB | 5 Q