3v4l.org

run code in 300+ PHP versions simultaneously
<?php class App_Collection implements ArrayAccess, IteratorAggregate, Countable { public $data = array('x'=>null); public function count() { return count($this->data); } public function offsetExists($offset) { return isset($this->data[$offset]) || array_key_exists($offset, $this->data); } public function offsetGet($offset) { if ($this->offsetExists($offset)) { return $this->data[$offset]; } return false; } public function offsetSet($offset, $value) { if ($offset) { $this->data[$offset] = $value; } else { $this->data[] = $value; } } public function offsetUnset($offset) { unset($this->data[$offset]); } public function getIterator() { return new ArrayIterator($this->data); } } $array = new App_Collection(); var_dump(isset($array['x'])); var_dump(array_key_exists('x', $array));

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.0060.00918.56
8.3.50.0060.00921.15
8.3.40.0040.01118.79
8.3.30.0040.01519.05
8.3.20.0000.00820.04
8.3.10.0070.00023.65
8.3.00.0000.00819.38
8.2.180.0110.01118.41
8.2.170.0090.00622.96
8.2.160.0100.00319.34
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00022.42
8.2.110.0090.00020.29
8.2.100.0060.00618.22
8.2.90.0060.00319.21
8.2.80.0000.00817.97
8.2.70.0050.00317.38
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0080.00020.04
8.2.30.0000.00718.16
8.2.20.0040.00417.82
8.2.10.0030.00518.04
8.2.00.0000.00717.88
8.1.280.0110.00325.92
8.1.270.0080.00022.02
8.1.260.0040.00826.35
8.1.250.0070.00028.09
8.1.240.0090.00023.71
8.1.230.0080.00418.97
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0060.00317.35
8.1.190.0050.00317.25
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0030.00622.06
8.1.150.0000.00818.87
8.1.140.0040.00417.32
8.1.130.0000.00717.82
8.1.120.0000.00717.51
8.1.110.0040.00417.36
8.1.100.0030.00317.48
8.1.90.0000.00717.46
8.1.80.0070.00017.35
8.1.70.0040.00417.49
8.1.60.0030.00717.58
8.1.50.0040.00417.43
8.1.40.0050.00317.52
8.1.30.0050.00317.57
8.1.20.0000.00917.73
8.1.10.0000.00817.59
8.1.00.0020.00517.49
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.36
8.0.270.0000.00717.18
8.0.260.0060.00017.26
8.0.250.0060.00017.00
8.0.240.0040.00416.95
8.0.230.0070.00017.00
8.0.220.0040.00417.01
8.0.210.0040.00416.96
8.0.200.0030.00317.02
8.0.190.0000.00716.93
8.0.180.0000.00716.98
8.0.170.0000.00817.03
8.0.160.0060.00316.88
8.0.150.0050.00216.95
8.0.140.0050.00316.90
8.0.130.0040.00413.36
8.0.120.0000.00716.86
8.0.110.0000.00716.88
8.0.100.0000.00716.83
8.0.90.0000.00716.99
8.0.80.0090.00616.89
8.0.70.0070.00016.95
8.0.60.0040.00417.08
8.0.50.0000.00717.08
8.0.30.0110.00717.17
8.0.20.0110.00917.40
8.0.10.0040.00416.92
8.0.00.0160.00316.61
7.4.330.0050.00015.00
7.4.320.0000.00716.57
7.4.300.0030.00316.59
7.4.290.0030.00316.52
7.4.280.0030.00416.55
7.4.270.0030.00316.64
7.4.260.0040.00416.49
7.4.250.0050.00316.56
7.4.240.0000.00716.63
7.4.230.0070.00016.57
7.4.220.0040.01516.71
7.4.210.0030.01616.70
7.4.200.0040.00416.45
7.4.160.0090.00616.55
7.4.150.0100.00717.40
7.4.140.0110.00517.86
7.4.130.0110.00816.52
7.4.120.0090.01216.57
7.4.110.0100.00916.60
7.4.100.0200.00316.44
7.4.90.0140.01116.51
7.4.80.0080.00819.39
7.4.70.0110.00516.54
7.4.60.0080.00816.66
7.4.50.0020.00216.55
7.4.40.0050.01116.52
7.4.30.0090.00916.77
7.4.10.0060.01315.02
7.4.00.0070.01014.98
7.3.330.0030.00313.07
7.3.320.0000.00513.32
7.3.310.0070.00016.25
7.3.300.0030.00316.12
7.3.290.0030.01016.22
7.3.280.0110.00716.22
7.3.270.0110.00817.40
7.3.260.0120.00416.48
7.3.250.0240.00016.28
7.3.240.0190.00316.46
7.3.230.0100.00716.39
7.3.210.0100.00716.39
7.3.200.0060.01019.39
7.3.190.0110.00716.42
7.3.180.0060.00916.23
7.3.170.0120.00616.27
7.3.160.0080.00916.50
7.3.130.0070.00714.64
7.3.120.0130.00714.53
7.3.110.0040.01214.83
7.3.100.0070.01014.66
7.3.90.0030.01214.36
7.3.80.0110.00314.73
7.3.70.0090.00614.88
7.3.60.0120.00014.73
7.3.50.0040.00814.70
7.3.40.0100.00314.46
7.3.30.0040.00814.62
7.3.20.0070.00716.74
7.3.10.0090.00616.37
7.3.00.0050.00816.58
7.2.330.0180.00316.38
7.2.320.0110.00616.73
7.2.310.0150.00316.52
7.2.300.0090.01516.46
7.2.290.0100.01416.33
7.2.260.0070.01414.84
7.2.250.0070.01115.15
7.2.240.0120.00315.15
7.2.230.0110.00414.80
7.2.220.0030.00715.14
7.2.210.0090.00315.25
7.2.200.0090.00615.18
7.2.190.0100.00315.00
7.2.180.0060.01014.98
7.2.170.0100.00314.96
7.2.160.0030.01015.15
7.2.150.0060.00316.77
7.2.140.0030.00716.66
7.2.130.0140.00416.49
7.2.120.0120.00316.70
7.2.110.0090.00616.60
7.2.100.0120.00316.70
7.2.90.0080.00816.65
7.2.80.0050.01116.66
7.2.70.0090.00816.61
7.2.60.0050.01016.68
7.2.50.0080.00516.75
7.2.40.0090.00616.66
7.2.30.0090.00916.74
7.2.20.0040.00916.76
7.2.10.0070.00816.88
7.2.00.0080.00716.76
7.1.330.0030.01015.90
7.1.320.0040.00715.82
7.1.310.0060.00915.76
7.1.300.0070.00415.75
7.1.290.0030.00615.67
7.1.280.0090.00415.78
7.1.270.0030.00915.84
7.1.260.0030.01415.51
7.1.250.0060.01015.56
7.1.240.0110.00415.79
7.1.230.0030.00615.75
7.1.220.0030.00815.84
7.1.210.0030.00715.85
7.1.200.0030.01015.76
7.1.190.0040.00715.73
7.1.180.0040.00815.80
7.1.170.0140.00015.57
7.1.160.0000.01415.95
7.1.150.0070.00715.77
7.1.140.0080.00415.88
7.1.130.0060.00615.56
7.1.120.0100.00315.45
7.1.110.0030.01015.63
7.1.100.0060.00915.86
7.1.90.0040.00415.62
7.1.80.0030.01015.49
7.1.70.0060.00616.52
7.1.60.0090.00917.58
7.1.50.0180.00725.29
7.1.40.0000.01315.46
7.1.30.0100.00315.52
7.1.20.0040.00815.36
7.1.10.0060.00615.63
7.1.00.0050.04018.97
7.0.330.0000.01215.16
7.0.320.0090.00315.29
7.0.310.0070.01015.18
7.0.300.0090.00615.39
7.0.290.0030.01015.11
7.0.280.0060.01015.06
7.0.270.0070.00715.32
7.0.260.0090.00615.34
7.0.250.0030.00615.28
7.0.240.0080.00415.36
7.0.230.0030.01315.35
7.0.220.0040.01215.25
7.0.210.0070.01015.29
7.0.200.0040.00415.93
7.0.190.0070.00715.46
7.0.180.0070.00715.19
7.0.170.0090.00015.46
7.0.160.0030.00515.33
7.0.150.0060.00615.32
7.0.140.0030.04218.75
7.0.130.0030.00715.34
7.0.120.0070.00715.49
7.0.110.0100.00615.17
7.0.100.0090.00315.19
7.0.90.0030.00815.38
7.0.80.0040.00414.98
7.0.70.1950.02017.71
7.0.60.0080.03817.70
7.0.50.0070.02216.68
7.0.40.0060.02616.71
7.0.30.0150.04316.83
7.0.20.0170.02516.65
7.0.10.0200.04316.86
7.0.00.0100.04416.70
5.6.400.0110.00714.27
5.6.390.0030.00614.23
5.6.380.0040.01114.22
5.6.370.0100.00714.05
5.6.360.0030.01014.52
5.6.350.0090.00614.21
5.6.340.0090.00314.28
5.6.330.0030.01414.41
5.6.320.0040.01114.51
5.6.310.0030.01314.16
5.6.300.0000.01814.46
5.6.290.0060.01314.35
5.6.280.0020.04317.61
5.6.270.0120.00314.27
5.6.260.0070.00714.52
5.6.250.0030.01014.05
5.6.240.0030.01014.04
5.6.230.0040.01114.27
5.6.220.0030.01214.39
5.6.210.0020.03117.30
5.6.200.0110.03916.28
5.6.190.0140.04017.34
5.6.180.0140.02517.47
5.6.170.0130.02417.39
5.6.160.0050.02717.39
5.6.150.0050.04516.04
5.6.140.0110.03916.29
5.6.130.0060.02816.12
5.6.120.0030.02717.57
5.6.110.0050.03817.64
5.6.100.0050.04717.54
5.6.90.0100.03417.62
5.6.80.0070.03817.35
5.6.70.0080.02117.33
5.6.60.0000.00814.10
5.6.50.0030.00713.93
5.6.40.0060.00914.11
5.6.30.0070.00714.26
5.6.20.0040.00814.36
5.6.10.0120.00314.20
5.6.00.0060.00314.39
5.5.380.0100.00714.05
5.5.370.0000.01514.52
5.5.360.0030.00914.12
5.5.350.0040.02217.35
5.5.340.0100.04016.15
5.5.330.0080.04717.28
5.5.320.0080.04017.40
5.5.310.0080.02517.22
5.5.300.0070.02316.08
5.5.290.0080.02316.06
5.5.280.0060.02317.46
5.5.270.0100.04217.29
5.5.260.0120.03717.41
5.5.250.0050.04817.45
5.5.240.0020.02617.12
5.5.230.0110.00414.10
5.5.220.0070.00714.39
5.5.210.0140.00314.29
5.5.200.0120.00314.11
5.5.190.0070.00714.04
5.5.180.0090.00614.07
5.5.170.0120.00414.13
5.5.160.0040.00814.27
5.5.150.0000.00814.37
5.5.140.0040.01114.06
5.5.130.0060.00914.29
5.5.120.0040.01114.02
5.5.110.0040.01114.02
5.5.100.0060.01214.08
5.5.90.0060.01214.19
5.5.80.0070.00714.29
5.5.70.0040.00714.32
5.5.60.0040.00814.13
5.5.50.0040.01414.09
5.5.40.0070.01014.22
5.5.30.0020.01314.15
5.5.20.0090.00314.44
5.5.10.0030.01314.43
5.5.00.0090.00313.87
5.4.450.0090.02915.40
5.4.440.0400.03715.15
5.4.430.0490.03015.11
5.4.420.0370.00215.27
5.4.410.0360.00315.31
5.4.400.0350.00415.04
5.4.390.0350.00215.04
5.4.380.0350.00015.01
5.4.370.0380.00015.17
5.4.360.0330.00415.25
5.4.350.0400.00215.06
5.4.340.0040.02511.51
5.4.330.0000.01010.98
5.4.320.0040.02411.77
5.4.310.0050.02211.76
5.4.300.0020.02211.75
5.4.290.0070.02111.85
5.4.280.0050.01911.69
5.4.270.0050.02411.83
5.4.260.0060.02311.79
5.4.250.0060.02211.70
5.4.240.0060.02011.81
5.4.230.0060.01911.82
5.4.220.0020.02411.78
5.4.210.0060.02111.73
5.4.200.0050.02311.66
5.4.190.0070.01911.75
5.4.180.0060.02211.66
5.4.170.0060.02211.70
5.4.160.0060.02211.80
5.4.150.0040.02211.67
5.4.140.0020.02411.54
5.4.130.0040.02011.43
5.4.120.0050.02011.59
5.4.110.0040.02211.47
5.4.100.0040.02311.49
5.4.90.0060.02011.38
5.4.80.0040.02311.30
5.4.70.0020.02111.55
5.4.60.0040.02211.40
5.4.50.0050.02011.39
5.4.40.0050.02011.54
5.4.30.0070.01911.56
5.4.20.0050.01911.63
5.4.10.0040.02311.38
5.4.00.0070.02111.16
5.3.290.0100.03812.80
5.3.280.0080.03512.71
5.3.270.0050.03912.72
5.3.260.0040.04112.72
5.3.250.0100.03812.72
5.3.240.0080.03512.72
5.3.230.0040.04012.71
5.3.220.0030.04312.68
5.3.210.0060.04012.68
5.3.200.0080.03412.68
5.3.190.0030.04012.68
5.3.180.0070.03412.67
5.3.170.0110.03912.67
5.3.160.0060.03612.67
5.3.150.0030.04012.67
5.3.140.0040.03912.66
5.3.130.0030.04212.66
5.3.120.0080.04112.66
5.3.110.0090.03612.66
5.3.100.0080.03412.13
5.3.90.0100.03212.11
5.3.80.0040.03812.11
5.3.70.0070.03612.10
5.3.60.0030.04012.09
5.3.50.0070.03412.04
5.3.40.0090.03312.04
5.3.30.0070.03411.99
5.3.20.0070.03411.78
5.3.10.0110.03011.74
5.3.00.0040.03811.73
5.2.170.0030.0339.23
5.2.160.0050.0299.23
5.2.150.0050.0329.23
5.2.140.0080.0279.23
5.2.130.0040.0299.19
5.2.120.0040.0359.19
5.2.110.0040.0309.20
5.2.100.0060.0289.20
5.2.90.0050.0369.19
5.2.80.0040.0319.18
5.2.70.0060.0369.18
5.2.60.0060.0289.14
5.2.50.0040.0329.11
5.2.40.0030.0299.09
5.2.30.0050.0379.06
5.2.20.0030.0339.05
5.2.10.0050.0278.95
5.2.00.0040.0298.82
5.1.60.0050.0238.10
5.1.50.0030.0268.10
5.1.40.0020.0278.08
5.1.30.0040.0268.42
5.1.20.0050.0268.45
5.1.10.0050.0258.17
5.1.00.0040.0258.18
5.0.50.0050.0196.66
5.0.40.0030.0206.52
5.0.30.0030.0326.33
5.0.20.0030.0206.29
5.0.10.0020.0216.28
5.0.00.0020.0316.27
4.4.90.0010.0174.77
4.4.80.0040.0134.75
4.4.70.0010.0164.75
4.4.60.0050.0124.75
4.4.50.0020.0154.77
4.4.40.0020.0254.71
4.4.30.0030.0154.76
4.4.20.0040.0144.84
4.4.10.0030.0154.85
4.4.00.0010.0274.76
4.3.110.0000.0184.67
4.3.100.0040.0174.66
4.3.90.0030.0144.64
4.3.80.0020.0274.59
4.3.70.0050.0174.63
4.3.60.0040.0154.63
4.3.50.0040.0144.63
4.3.40.0040.0254.54
4.3.30.0020.0163.30
4.3.20.0020.0163.28
4.3.10.0040.0143.23
4.3.00.0030.0237.20

preferences:
50.55 ms | 401 KiB | 5 Q