3v4l.org

run code in 300+ PHP versions simultaneously
<?php class App_Collection implements ArrayAccess, IteratorAggregate, Countable { public $data = array('x'=>'a'); 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.40.0040.01518.79
8.3.30.0130.00719.27
8.3.20.0040.00420.20
8.3.10.0080.00023.66
8.3.00.0040.00419.13
8.2.170.0090.00622.96
8.2.160.0120.00319.16
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00022.24
8.2.110.0050.00520.35
8.2.100.0040.00818.16
8.2.90.0050.00319.39
8.2.80.0060.00317.97
8.2.70.0000.00817.61
8.2.60.0080.00018.04
8.2.50.0090.00018.07
8.2.40.0040.00419.91
8.2.30.0080.00018.18
8.2.20.0040.00417.80
8.2.10.0000.00718.20
8.2.00.0000.00717.69
8.1.270.0030.00521.87
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0100.00023.91
8.1.230.0070.00319.08
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0000.00818.62
8.1.160.0050.00321.94
8.1.150.0080.00018.90
8.1.140.0030.00517.46
8.1.130.0050.00317.77
8.1.120.0030.00517.49
8.1.110.0040.00417.48
8.1.100.0000.00817.46
8.1.90.0000.00717.34
8.1.80.0040.00417.45
8.1.70.0000.00717.40
8.1.60.0090.00017.50
8.1.50.0000.00817.44
8.1.40.0050.00317.54
8.1.30.0090.00017.73
8.1.20.0080.00017.53
8.1.10.0040.00417.60
8.1.00.0040.00417.54
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0040.00418.35
8.0.270.0030.00317.28
8.0.260.0030.00317.34
8.0.250.0060.00017.05
8.0.240.0040.00417.07
8.0.230.0040.00417.01
8.0.220.0070.00016.98
8.0.210.0070.00017.01
8.0.200.0000.00716.94
8.0.190.0040.00417.00
8.0.180.0040.00417.00
8.0.170.0080.00016.96
8.0.160.0040.00717.04
8.0.150.0030.00316.98
8.0.140.0040.00416.89
8.0.130.0000.00613.37
8.0.120.0020.00516.96
8.0.110.0050.00216.89
8.0.100.0040.00416.99
8.0.90.0040.00416.87
8.0.80.0060.00916.96
8.0.70.0000.00716.86
8.0.60.0000.00717.00
8.0.50.0000.00716.90
8.0.30.0040.01717.10
8.0.20.0090.01017.40
8.0.10.0000.00717.13
8.0.00.0070.01116.71
7.4.330.0000.00515.00
7.4.320.0040.00416.54
7.4.300.0040.00416.60
7.4.290.0070.00016.54
7.4.280.0070.00016.58
7.4.270.0030.00316.46
7.4.260.0040.00416.63
7.4.250.0000.00716.43
7.4.240.0020.00516.48
7.4.230.0000.00716.41
7.4.220.0060.01216.70
7.4.210.0070.00716.55
7.4.200.0070.00016.73
7.4.160.0110.00416.51
7.4.150.0080.01217.40
7.4.140.0090.00817.86
7.4.130.0090.00816.50
7.4.120.0120.00716.60
7.4.110.0000.01716.50
7.4.100.0090.01316.50
7.4.90.0090.01616.58
7.4.80.0070.01019.39
7.4.70.0090.00816.57
7.4.60.0100.00716.58
7.4.50.0000.00816.27
7.4.40.0080.01616.29
7.4.30.0130.00316.38
7.4.00.0060.01214.91
7.3.330.0000.00513.20
7.3.320.0020.00213.25
7.3.310.0030.00316.23
7.3.300.0060.00016.20
7.3.290.0100.00316.23
7.3.280.0090.01116.17
7.3.270.0090.00917.40
7.3.260.0080.00816.28
7.3.250.0080.01016.34
7.3.240.0060.01516.25
7.3.230.0140.00316.48
7.3.210.0030.01316.39
7.3.200.0100.00719.39
7.3.190.0090.01216.49
7.3.180.0040.01116.26
7.3.170.0150.00616.43
7.3.160.0040.01216.45
7.2.330.0180.00016.81
7.2.320.0110.00816.75
7.2.310.0170.00616.40
7.2.300.0100.00716.50
7.2.290.0130.01016.61
7.2.60.0040.01116.87
7.1.200.0040.00815.84
7.1.70.0040.00717.15
7.1.60.0100.01319.32
7.1.50.0230.01334.92
7.1.00.0030.07722.41
7.0.200.0000.00716.60
7.0.140.0000.07722.00
7.0.60.0030.07719.80
7.0.50.0130.06317.99
7.0.40.0030.04720.15
7.0.30.0570.07020.16
7.0.20.0300.07720.08
7.0.10.0030.08720.09
7.0.00.0100.04720.20
5.6.280.0070.07021.16
5.6.210.0100.07720.66
5.6.200.0000.04718.22
5.6.190.0030.04320.41
5.6.180.0330.03720.39
5.6.170.0400.07320.50
5.6.160.0070.05020.56
5.6.150.0000.06018.16
5.6.140.0030.08718.17
5.6.130.0130.07318.13
5.6.120.0000.04320.96
5.6.110.0070.08320.90
5.6.100.0130.05720.89
5.6.90.0030.04021.09
5.6.80.0100.08020.39
5.5.350.0170.08020.51
5.5.340.0070.08017.98
5.5.330.0070.07320.43
5.5.320.0470.07020.27
5.5.310.0200.04320.39
5.5.300.0130.05018.04
5.5.290.0030.08718.07
5.5.280.0030.09320.90
5.5.270.0000.07720.87
5.5.260.0100.07320.65
5.5.250.0130.04320.63
5.5.240.0300.07020.13
5.4.450.0730.07019.42
5.4.440.0700.06019.66
5.4.430.0770.05319.52
5.4.420.0870.00019.37
5.4.410.0630.00019.41
5.4.400.0600.00019.22
5.4.390.0630.00019.12
5.4.380.0630.00019.25
5.4.370.0670.00019.13
5.4.360.0830.00019.09
5.4.350.0630.00019.16
5.4.340.0070.03212.02
5.4.320.0080.03412.51
5.4.310.0090.03512.50
5.4.300.0070.03412.51
5.4.290.0050.03912.50
5.4.280.0050.03512.40
5.4.270.0080.03512.40
5.4.260.0080.03512.40
5.4.250.0070.03712.40
5.4.240.0050.04312.40
5.4.230.0090.04512.39
5.4.220.0080.03912.39
5.4.210.0020.04212.39
5.4.200.0110.03712.39
5.4.190.0090.03312.39
5.4.180.0060.03712.39
5.4.170.0090.03312.40
5.4.160.0110.03112.40
5.4.150.0060.03612.39
5.4.140.0050.04312.08
5.4.130.0060.03812.07
5.4.120.0070.03712.02
5.4.110.0100.03512.02
5.4.100.0060.03812.02
5.4.90.0080.03912.02
5.4.80.0080.03812.02
5.4.70.0090.03312.01
5.4.60.0030.03712.02
5.4.50.0060.03612.01
5.4.40.0080.04112.00
5.4.30.0080.03212.00
5.4.20.0050.03512.00
5.4.10.0070.03312.00
5.4.00.0090.04011.49
5.3.290.0080.03612.80
5.3.280.0070.03612.71
5.3.270.0070.03712.72
5.3.260.0080.04212.72
5.3.250.0040.03812.72
5.3.240.0060.03512.72
5.3.230.0080.03612.71
5.3.220.0040.03812.68
5.3.210.0070.03712.68
5.3.200.0070.03612.68
5.3.190.0060.04412.68
5.3.180.0040.04112.67
5.3.170.0080.03312.67
5.3.160.0050.03612.67
5.3.150.0050.05012.68
5.3.140.0050.03612.66
5.3.130.0040.04612.66
5.3.120.0030.04012.66
5.3.110.0040.03912.65
5.3.100.0070.04112.13
5.3.90.0070.04212.11
5.3.80.0040.04612.10
5.3.70.0050.04212.10
5.3.60.0030.04212.09
5.3.50.0060.03612.04
5.3.40.0020.04612.04
5.3.30.0050.04111.99
5.3.20.0050.03611.78
5.3.10.0040.03611.74
5.3.00.0060.03411.73
5.2.170.0050.0299.23
5.2.160.0040.0309.23
5.2.150.0030.0319.23
5.2.140.0040.0319.23
5.2.130.0070.0279.19
5.2.120.0060.0279.19
5.2.110.0080.0389.20
5.2.100.0030.0319.19
5.2.90.0050.0319.20
5.2.80.0020.0379.18
5.2.70.0040.0359.19
5.2.60.0080.0329.14
5.2.50.0070.0279.11
5.2.40.0070.0319.09
5.2.30.0020.0319.06
5.2.20.0020.0309.04
5.2.10.0020.0298.95
5.2.00.0070.0268.82
5.1.60.0010.0268.10
5.1.50.0090.0288.09
5.1.40.0060.0228.08
5.1.30.0060.0248.42
5.1.20.0020.0288.45
5.1.10.0030.0278.17
5.1.00.0020.0278.18
5.0.50.0060.0226.66
5.0.40.0020.0266.52
5.0.30.0040.0306.33
5.0.20.0050.0216.30
5.0.10.0050.0196.28
5.0.00.0040.0356.27
4.4.90.0020.0164.78
4.4.80.0030.0144.76
4.4.70.0010.0174.76
4.4.60.0000.0174.75
4.4.50.0030.0144.77
4.4.40.0020.0254.70
4.4.30.0030.0154.76
4.4.20.0030.0154.85
4.4.10.0020.0164.85
4.4.00.0050.0234.76
4.3.110.0040.0144.67
4.3.100.0010.0164.66
4.3.90.0050.0154.63
4.3.80.0040.0234.58
4.3.70.0030.0144.63
4.3.60.0040.0154.63
4.3.50.0030.0184.63
4.3.40.0030.0234.54
4.3.30.0010.0173.30
4.3.20.0030.0193.28
4.3.10.0020.0163.23
4.3.00.0200.0237.20

preferences:
34.84 ms | 400 KiB | 5 Q