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) { echo $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 = '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.60.0000.01418.39
8.3.50.0130.00721.98
8.3.40.0140.00718.61
8.3.30.0070.00719.14
8.3.20.0080.00020.30
8.3.10.0030.00623.51
8.3.00.0060.00321.00
8.2.180.0100.00616.50
8.2.170.0090.00622.96
8.2.160.0070.00720.36
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0080.00019.25
8.2.110.0040.00422.07
8.2.100.0000.01120.54
8.2.90.0070.00019.23
8.2.80.0050.00317.97
8.2.70.0070.00317.50
8.2.60.0060.00317.77
8.2.50.0000.00918.07
8.2.40.0040.00419.68
8.2.30.0070.00018.13
8.2.20.0040.00417.75
8.2.10.0040.00418.11
8.2.00.0040.00417.80
8.1.280.0060.00925.92
8.1.270.0080.00023.85
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0100.00022.02
8.1.230.0090.00318.96
8.1.220.0040.00417.79
8.1.210.0000.00918.77
8.1.200.0090.00017.35
8.1.190.0000.00817.11
8.1.180.0030.00618.10
8.1.170.0000.00818.71
8.1.160.0070.00022.09
8.1.150.0050.00318.76
8.1.140.0030.00617.34
8.1.130.0030.00319.52
8.1.120.0040.00417.45
8.1.110.0030.00617.44
8.1.100.0040.00417.48
8.1.90.0070.00017.47
8.1.80.0040.00417.35
8.1.70.0000.00717.43
8.1.60.0000.00717.58
8.1.50.0040.00417.41
8.1.40.0040.00417.49
8.1.30.0000.00817.65
8.1.20.0040.00417.64
8.1.10.0050.00217.49
8.1.00.0070.00017.32
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0000.00717.33
8.0.260.0000.00617.19
8.0.250.0030.00316.99
8.0.240.0030.00616.87
8.0.230.0000.00716.94
8.0.220.0030.00316.86
8.0.210.0000.00716.78
8.0.200.0050.00316.91
8.0.190.0030.00616.99
8.0.180.0030.00316.94
8.0.170.0040.00416.92
8.0.160.0040.00416.86
8.0.150.0000.00716.87
8.0.140.0000.00816.89
8.0.130.0000.00613.28
8.0.120.0040.00416.79
8.0.110.0040.00416.82
8.0.100.0000.00716.93
8.0.90.0040.00416.95
8.0.80.0070.01416.94
8.0.70.0050.00216.91
8.0.60.0000.00816.86
8.0.50.0050.00216.75
8.0.30.0100.00817.08
8.0.20.0140.00717.40
8.0.10.0000.00817.07
8.0.00.0160.02116.85
7.4.330.0060.00015.09
7.4.320.0040.00416.53
7.4.300.0000.00616.59
7.4.290.0070.00316.45
7.4.280.0040.00416.61
7.4.270.0030.00316.54
7.4.260.0000.00716.41
7.4.250.0000.00716.53
7.4.240.0020.00516.59
7.4.230.0040.00416.40
7.4.220.0030.01316.54
7.4.210.0140.00016.51
7.4.200.0000.00816.70
7.4.160.0110.00416.40
7.4.150.0120.00617.40
7.4.140.0100.00717.86
7.4.130.0110.00616.48
7.4.120.0100.00616.54
7.4.110.0030.01316.43
7.4.100.0130.00316.44
7.4.90.0150.00616.43
7.4.80.0190.00319.39
7.4.70.0000.01716.39
7.4.60.0130.01016.52
7.4.50.0030.00316.63
7.4.40.0060.01016.43
7.4.30.0090.00616.36
7.4.10.0120.00615.07
7.4.00.0080.01014.98
7.3.330.0000.00613.16
7.3.320.0000.00613.30
7.3.310.0030.00316.35
7.3.300.0070.00016.30
7.3.290.0000.01616.29
7.3.280.0100.00716.30
7.3.270.0160.00717.40
7.3.260.0120.00616.30
7.3.250.0050.01216.51
7.3.240.0060.01016.29
7.3.230.0100.01316.54
7.3.210.0060.01316.30
7.3.200.0060.01119.39
7.3.190.0150.00616.35
7.3.180.0040.01216.68
7.3.170.0130.00316.28
7.3.160.0090.01016.35
7.3.130.0040.01614.93
7.3.120.0050.01214.84
7.3.110.0070.01214.87
7.3.100.0070.00914.91
7.3.90.0070.00514.76
7.3.80.0030.01014.62
7.3.70.0060.00914.85
7.3.60.0040.01214.64
7.3.50.0040.00814.71
7.3.40.0060.00914.61
7.3.30.0050.00814.90
7.3.20.0070.00716.69
7.3.10.0050.00716.64
7.3.00.0060.00516.53
7.2.330.0120.00616.68
7.2.320.0100.01016.79
7.2.310.0110.01116.62
7.2.300.0080.00816.50
7.2.290.0030.01816.61
7.2.260.0060.01214.89
7.2.250.0100.00815.04
7.2.240.0090.00914.97
7.2.230.0060.00815.12
7.2.220.0050.00814.88
7.2.210.0020.01015.01
7.2.200.0000.01315.14
7.2.190.0090.00214.97
7.2.180.0070.00714.97
7.2.170.0090.00315.09
7.2.160.0110.00714.83
7.2.150.0070.00316.72
7.2.140.0000.01416.89
7.2.130.0080.00616.96
7.2.120.0100.00616.81
7.2.110.0080.00616.91
7.2.100.0070.00716.87
7.2.90.0070.00716.97
7.2.80.0040.01016.95
7.2.70.0060.00816.89
7.2.60.0050.00816.82
7.2.50.0050.00916.81
7.2.40.0040.00616.96
7.2.30.0100.00716.94
7.2.20.0040.01016.89
7.2.10.0070.00816.95
7.2.00.0050.00817.45
7.1.330.0080.00615.85
7.1.320.0060.00615.74
7.1.310.0030.00915.58
7.1.300.0020.01215.63
7.1.290.0110.00315.80
7.1.280.0020.01215.87
7.1.270.0050.00915.79
7.1.260.0070.00815.72
7.1.250.0080.00415.70
7.1.240.0060.00515.62
7.1.230.0040.00915.70
7.1.220.0090.00415.73
7.1.210.0020.01315.48
7.1.200.0160.00015.67
7.1.190.0050.00815.81
7.1.180.0100.00315.72
7.1.170.0050.01015.66
7.1.160.0040.00915.74
7.1.150.0070.00515.92
7.1.140.0030.01015.58
7.1.130.0090.00615.68
7.1.120.0050.00615.71
7.1.110.0080.00715.83
7.1.100.0050.00716.44
7.1.90.0070.00415.68
7.1.80.0050.00715.80
7.1.70.0040.00916.30
7.1.60.0090.00817.13
7.1.50.0090.00716.17
7.1.40.0050.00815.79
7.1.30.0030.00815.75
7.1.20.0110.00315.54
7.1.10.0060.01015.74
7.1.00.0040.03117.87
7.0.330.0060.00615.48
7.0.320.0040.00715.38
7.0.310.0080.00615.36
7.0.300.0080.00515.09
7.0.290.0090.00315.27
7.0.280.0110.00615.26
7.0.270.0080.00615.46
7.0.260.0070.00215.27
7.0.250.0070.00515.34
7.0.240.0040.00615.28
7.0.230.0040.00815.14
7.0.220.0050.00815.35
7.0.210.0050.00715.47
7.0.200.0060.00415.78
7.0.190.0040.00915.35
7.0.180.0050.00615.46
7.0.170.0060.00415.37
7.0.160.0090.00515.21
7.0.150.0050.00915.44
7.0.140.0070.02817.50
7.0.130.0060.00715.21
7.0.120.0050.01015.46
7.0.110.0050.00715.47
7.0.100.0050.01816.85
7.0.90.0040.01916.85
7.0.80.0020.02216.88
7.0.70.0060.03416.83
7.0.60.0090.02916.85
7.0.50.0070.02017.13
7.0.40.0070.01715.71
7.0.30.0070.03015.55
7.0.20.0020.03515.77
7.0.10.0090.02615.66
7.0.00.0080.02815.62
5.6.400.0060.00914.28
5.6.390.0030.00914.01
5.6.380.0060.00814.17
5.6.370.0080.00414.37
5.6.360.0030.00914.08
5.6.350.0060.00514.65
5.6.340.0070.00914.42
5.6.330.0050.00914.24
5.6.320.0070.00614.23
5.6.310.0040.00814.44
5.6.300.0080.00314.37
5.6.290.0020.01214.09
5.6.280.0030.03116.68
5.6.270.0060.00714.34
5.6.260.0020.01114.39
5.6.250.0050.01816.47
5.6.240.0070.01616.43
5.6.230.0080.02216.40
5.6.220.0030.01916.54
5.6.210.0070.03616.43
5.6.200.0040.03216.74
5.6.190.0080.03316.49
5.6.180.0060.03016.46
5.6.170.0070.03416.53
5.6.160.0070.03416.50
5.6.150.0090.01616.54
5.6.140.0070.03216.69
5.6.130.0100.03016.53
5.6.120.0100.03116.54
5.6.110.0070.03516.50
5.6.100.0070.02716.41
5.6.90.0100.02616.52
5.6.80.0080.03116.29
5.6.70.0090.03016.35
5.6.60.0070.02116.26
5.6.50.0070.01916.23
5.6.40.0040.02416.36
5.6.30.0060.02016.29
5.6.20.0060.03616.36
5.6.10.0070.03216.40
5.6.00.0030.02516.23
5.5.380.0030.02015.50
5.5.370.0080.02815.45
5.5.360.0050.02315.49
5.5.350.0050.03315.40
5.5.340.0040.01715.46
5.5.330.0070.03215.66
5.5.320.0050.03215.50
5.5.310.0080.03015.52
5.5.300.0040.03315.68
5.5.290.0050.02415.58
5.5.280.0070.03215.69
5.5.270.0030.02715.63
5.5.260.0080.02915.61
5.5.250.0040.03415.59
5.5.240.0020.03315.34
5.5.230.0070.02915.40
5.5.220.0040.02515.40
5.5.210.0010.02215.28
5.5.200.0060.02415.24
5.5.190.0070.02815.37
5.5.180.0020.02415.30
5.5.170.0030.01012.77
5.5.160.0030.02715.35
5.5.150.0020.03115.33
5.5.140.0020.03015.41
5.5.130.0060.02915.43
5.5.120.0080.02915.41
5.5.110.0090.02015.27
5.5.100.0050.02915.40
5.5.90.0040.02315.26
5.5.80.0070.02915.31
5.5.70.0070.02815.24
5.5.60.0020.03215.37
5.5.50.0090.02015.22
5.5.40.0100.02115.25
5.5.30.0040.02915.22
5.5.20.0080.02815.31
5.5.10.0060.01615.35
5.5.00.0100.02915.32
5.4.450.0060.02113.91
5.4.440.0050.01913.95
5.4.430.0070.02814.02
5.4.420.0080.02613.98
5.4.410.0070.02714.07
5.4.400.0090.02413.98
5.4.390.0050.02713.81
5.4.380.0050.02813.98
5.4.370.0020.03213.86
5.4.360.0090.02413.85
5.4.350.0040.03013.87
5.4.340.0020.03013.91
5.4.330.0060.00311.21
5.4.320.0090.02513.82
5.4.310.0050.03213.90
5.4.300.0050.02913.99
5.4.290.0010.02813.98
5.4.280.0070.02413.90
5.4.270.0050.03013.91
5.4.260.0020.03213.92
5.4.250.0080.02413.95
5.4.240.0030.01813.92
5.4.230.0090.02413.92
5.4.220.0070.02713.85
5.4.210.0060.02313.83
5.4.200.0070.02813.91
5.4.190.0020.03113.94
5.4.180.0050.02814.01
5.4.170.0060.02513.89
5.4.160.0050.02613.84
5.4.150.0050.03113.85
5.4.140.0060.01513.02
5.4.130.0090.01813.06
5.4.120.0030.01712.99
5.4.110.0050.02313.15
5.4.100.0020.03013.00
5.4.90.0040.02813.02
5.4.80.0030.02613.08
5.4.70.0020.02712.89
5.4.60.0030.01912.93
5.4.50.0050.02612.94
5.4.40.0020.03013.03
5.4.30.0040.02813.05
5.4.20.0070.02113.00
5.4.10.0040.02513.07
5.4.00.0050.02712.90
5.3.290.0050.02512.38
5.3.280.0030.02812.34
5.3.270.0030.03012.32
5.3.260.0080.02712.31
5.3.250.0020.02612.33
5.3.240.0050.02912.38
5.3.230.0040.02712.33
5.3.220.0030.02912.33
5.3.210.0080.02812.31
5.3.200.0040.01712.35
5.3.190.0060.02812.33
5.3.180.0030.02912.31
5.3.170.0020.02512.36
5.3.160.0030.02812.37
5.3.150.0030.03112.33
5.3.140.0030.01612.31
5.3.130.0030.02912.31
5.3.120.0020.03212.30
5.3.110.0060.02912.31
5.3.100.0010.02312.19
5.3.90.0060.02612.17
5.3.80.0070.02212.18
5.3.70.0060.02512.14
5.3.60.0050.01912.16
5.3.50.0050.02512.10
5.3.40.0040.02212.10
5.3.30.0050.02212.15
5.3.20.0030.02612.01
5.3.10.0030.02812.06
5.3.00.0020.02712.05
5.2.170.0090.02911.92
5.2.160.0050.02311.92
5.2.150.0030.02311.92
5.2.140.0020.01811.92
5.2.130.0020.03311.92
5.2.120.0070.03011.92
5.2.110.0030.03111.92
5.2.100.0030.03311.92
5.2.90.0020.02311.92
5.2.80.0070.02711.92
5.2.70.0050.03311.92
5.2.60.0060.03211.92
5.2.50.0100.02011.92
5.2.40.0000.03711.92
5.2.30.0030.02211.92
5.2.20.0070.01811.92
5.2.10.0030.02311.92
5.2.00.0020.02911.92
5.1.60.0020.03011.92
5.1.50.0050.01711.92
5.1.40.0050.02211.92
5.1.30.0020.01911.92
5.1.20.0080.02811.92
5.1.10.0030.02111.92
5.1.00.0080.02511.92
5.0.50.0050.02211.92
5.0.40.0070.02211.92
5.0.30.0020.03511.92
5.0.20.0020.02611.92
5.0.10.0020.01611.92
5.0.00.0030.03111.92
4.4.90.0030.01911.92
4.4.80.0020.01611.92
4.4.70.0020.01811.92
4.4.60.0050.01211.92
4.4.50.0050.01611.92
4.4.40.0000.02211.92
4.4.30.0020.02011.92
4.4.20.0020.01211.92
4.4.10.0020.01911.92
4.4.00.0000.03111.92
4.3.110.0020.01811.92
4.3.100.0050.01611.92
4.3.90.0050.01511.92
4.3.80.0000.02911.92
4.3.70.0030.01611.92
4.3.60.0000.02111.92
4.3.50.0030.01811.92
4.3.40.0040.02111.92
4.3.30.0000.02111.92
4.3.20.0050.01811.92
4.3.10.0020.01511.92
4.3.00.0000.01811.92

preferences:
43.74 ms | 401 KiB | 5 Q