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])); } 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($array['x']));

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.0150.00816.63
8.3.60.0070.00718.56
8.3.50.0110.00721.21
8.3.40.0070.00718.96
8.3.30.0110.00319.06
8.3.20.0040.00420.31
8.3.10.0040.00423.43
8.3.00.0040.00419.23
8.2.180.0110.00318.41
8.2.170.0120.00322.96
8.2.160.0030.01020.43
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00326.16
8.2.120.0080.00022.23
8.2.110.0060.00320.97
8.2.100.0060.00619.70
8.2.90.0040.00419.35
8.2.80.0030.00517.97
8.2.70.0040.00417.75
8.2.60.0070.00317.93
8.2.50.0000.00818.07
8.2.40.0080.00018.02
8.2.30.0050.00218.20
8.2.20.0050.00217.83
8.2.10.0050.00318.06
8.2.00.0000.00717.77
8.1.280.0090.00925.92
8.1.270.0030.00621.91
8.1.260.0100.00026.35
8.1.250.0070.00028.09
8.1.240.0080.00320.85
8.1.230.0070.00322.08
8.1.220.0090.00017.78
8.1.210.0060.00318.77
8.1.200.0070.00417.35
8.1.190.0100.00017.35
8.1.180.0040.00418.10
8.1.170.0030.00718.46
8.1.160.0030.00618.91
8.1.150.0070.00018.95
8.1.140.0000.00717.52
8.1.130.0070.00017.81
8.1.120.0040.00417.49
8.1.110.0000.00817.37
8.1.100.0000.00717.52
8.1.90.0040.00417.44
8.1.80.0000.00717.38
8.1.70.0050.00217.36
8.1.60.0030.00617.59
8.1.50.0030.00617.59
8.1.40.0040.00417.42
8.1.30.0040.00417.70
8.1.20.0050.00317.64
8.1.10.0040.00417.55
8.1.00.0040.00417.53
8.0.300.0060.00318.77
8.0.290.0040.00716.75
8.0.280.0030.00318.40
8.0.270.0030.00317.24
8.0.260.0000.00617.28
8.0.250.0030.00317.07
8.0.240.0030.00617.02
8.0.230.0070.00016.95
8.0.220.0000.00716.89
8.0.210.0030.00316.83
8.0.200.0070.00017.03
8.0.190.0080.00017.06
8.0.180.0080.00016.88
8.0.170.0030.00616.91
8.0.160.0040.00416.88
8.0.150.0000.00816.98
8.0.140.0040.00416.98
8.0.130.0050.00013.36
8.0.120.0040.00417.05
8.0.110.0040.00416.95
8.0.100.0080.00016.76
8.0.90.0040.00416.83
8.0.80.0060.00916.98
8.0.70.0020.00517.00
8.0.60.0040.00417.03
8.0.50.0040.00417.06
8.0.30.0140.00617.05
8.0.20.0130.00717.40
8.0.10.0000.00716.93
8.0.00.0130.00516.94
7.4.330.0000.00415.00
7.4.320.0000.00716.67
7.4.300.0030.00316.61
7.4.290.0040.00416.61
7.4.280.0040.00416.55
7.4.270.0060.00316.63
7.4.260.0000.00716.53
7.4.250.0000.00716.51
7.4.240.0060.00216.61
7.4.230.0000.00716.27
7.4.220.0040.01416.66
7.4.210.0060.00816.73
7.4.200.0030.00316.57
7.4.160.0150.00016.50
7.4.150.0130.00617.40
7.4.140.0090.00817.86
7.4.130.0040.01416.56
7.4.120.0090.00816.42
7.4.110.0120.00616.68
7.4.100.0120.00916.52
7.4.90.0100.01016.30
7.4.80.0110.00916.59
7.4.70.0110.00716.38
7.4.60.0070.01116.63
7.4.50.0020.00216.46
7.4.40.0140.00416.59
7.4.30.0000.01616.30
7.4.10.0090.00914.92
7.4.00.0060.01215.00
7.3.330.0030.00313.19
7.3.320.0030.00313.20
7.3.310.0040.00416.41
7.3.300.0070.00016.24
7.3.290.0030.01016.35
7.3.280.0090.00716.37
7.3.270.0100.00717.40
7.3.260.0070.01016.57
7.3.250.0090.01216.56
7.3.240.0140.00616.42
7.3.230.0110.00716.57
7.3.210.0130.00316.45
7.3.200.0150.00919.39
7.3.190.0070.01416.39
7.3.180.0040.01116.34
7.3.170.0090.01016.42
7.3.160.0080.00816.39
7.3.130.0120.00614.86
7.3.120.0060.01214.88
7.3.110.0060.00614.66
7.3.100.0090.00614.96
7.3.90.0000.01014.92
7.3.80.0030.01415.00
7.3.70.0030.00614.82
7.3.60.0030.00914.57
7.3.50.0070.01014.81
7.3.40.0140.00014.61
7.3.30.0040.00714.71
7.3.20.0060.00916.72
7.3.10.0060.00916.46
7.3.00.0080.00416.65
7.2.330.0060.01216.32
7.2.320.0110.00816.77
7.2.310.0070.01016.73
7.2.300.0130.00316.75
7.2.290.0090.00916.80
7.2.260.0110.00714.95
7.2.250.0100.00714.96
7.2.240.0110.00415.15
7.2.230.0040.01114.71
7.2.220.0000.01314.93
7.2.210.0040.00814.91
7.2.200.0040.00714.77
7.2.190.0070.00714.95
7.2.180.0060.00915.15
7.2.170.0090.00914.76
7.2.160.0110.00315.03
7.2.150.0090.00916.80
7.2.140.0130.00316.89
7.2.130.0030.00916.94
7.2.120.0060.01216.88
7.2.110.0090.00916.96
7.2.100.0120.00616.95
7.2.90.0070.01016.70
7.2.80.0060.00616.71
7.2.70.0060.00317.00
7.2.60.0150.00016.86
7.2.50.0060.00916.95
7.2.40.0060.00616.86
7.2.30.0000.00916.66
7.2.20.0030.01016.72
7.2.10.0100.00316.66
7.2.00.0070.01017.00
7.1.330.0070.00715.88
7.1.320.0070.00715.82
7.1.310.0030.00715.57
7.1.300.0090.00415.85
7.1.290.0100.00315.66
7.1.280.0030.00615.84
7.1.270.0070.00715.65
7.1.260.0040.01216.00
7.1.250.0070.00715.46
7.1.240.0080.00815.89
7.1.230.0090.00615.97
7.1.220.0100.00715.93
7.1.210.0030.00615.89
7.1.200.0060.00915.93
7.1.190.0060.00315.73
7.1.180.0040.00716.02
7.1.170.0070.01015.82
7.1.160.0030.00915.89
7.1.150.0000.00816.02
7.1.140.0030.01315.95
7.1.130.0150.00315.60
7.1.120.0000.01415.49
7.1.110.0030.01416.02
7.1.100.0000.01315.99
7.1.90.0070.00715.88
7.1.80.0070.01015.67
7.1.70.0030.00816.48
7.1.60.0090.00616.39
7.1.50.0060.01116.38
7.1.40.0030.01015.80
7.1.30.0000.01315.78
7.1.20.0040.01115.77
7.1.10.0070.00315.88
7.1.00.0110.03619.20
7.0.330.0000.01415.34
7.0.320.0030.01315.46
7.0.310.0070.00715.46
7.0.300.0120.00415.45
7.0.290.0000.00815.45
7.0.280.0080.00315.43
7.0.270.0060.01215.43
7.0.260.0070.01015.20
7.0.250.0090.00315.39
7.0.240.0000.01415.28
7.0.230.0060.00615.20
7.0.220.0070.00715.39
7.0.210.0030.01015.32
7.0.200.0020.00715.95
7.0.190.0060.00615.41
7.0.180.0040.00815.46
7.0.170.0000.01415.55
7.0.160.0000.00815.22
7.0.150.0040.00715.31
7.0.140.0030.04118.79
7.0.130.0030.01015.45
7.0.120.0040.00815.43
7.0.110.0030.00915.36
7.0.100.0030.00615.29
7.0.90.0040.00815.23
7.0.80.0090.00915.43
7.0.70.0000.01115.40
7.0.60.0060.02117.69
7.0.50.0070.02216.75
7.0.40.0020.02616.90
7.0.30.0250.03716.92
7.0.20.0200.04216.76
7.0.10.0050.02416.79
7.0.00.0050.04716.75
5.6.400.0040.00814.34
5.6.390.0030.01014.39
5.6.380.0040.00814.63
5.6.370.0060.01014.54
5.6.360.0080.00414.42
5.6.350.0040.00814.23
5.6.340.0100.00314.38
5.6.330.0110.00714.39
5.6.320.0050.00514.31
5.6.310.0060.00614.33
5.6.300.0060.00314.23
5.6.290.0130.00014.40
5.6.280.0050.04017.60
5.6.270.0030.01314.35
5.6.260.0030.01014.52
5.6.250.0040.01214.57
5.6.240.0000.00914.25
5.6.230.0030.01414.26
5.6.220.0060.00314.29
5.6.210.0060.02517.66
5.6.200.0070.04216.40
5.6.190.0070.02217.49
5.6.180.0150.02517.58
5.6.170.0130.04717.56
5.6.160.0120.01717.44
5.6.150.0080.02716.19
5.6.140.0030.02516.38
5.6.130.0050.02316.24
5.6.120.0030.03917.85
5.6.110.0080.03017.87
5.6.100.0080.04417.78
5.6.90.0020.04417.79
5.6.80.0130.03817.48
5.6.70.0060.00314.34
5.6.60.0040.01114.10
5.6.50.0080.00014.18
5.6.40.0120.00314.41
5.6.30.0070.00814.37
5.6.20.0070.00314.41
5.6.10.0030.01014.22
5.6.00.0060.00614.23
5.5.380.0070.00714.55
5.5.370.0000.00814.02
5.5.360.0030.00614.46
5.5.350.0030.04317.32
5.5.340.0090.04116.20
5.5.330.0130.04017.32
5.5.320.0140.03117.33
5.5.310.0170.04317.44
5.5.300.0110.02216.09
5.5.290.0050.04516.18
5.5.280.0070.04717.44
5.5.270.0140.03717.53
5.5.260.0100.04117.58
5.5.250.0070.02017.21
5.5.240.1500.02017.16
5.5.230.0000.01114.18
5.5.220.0030.00914.36
5.5.210.0080.00014.03
5.5.200.0080.00814.41
5.5.190.0090.00614.43
5.5.180.0000.00814.38
5.5.170.0000.01514.39
5.5.160.0070.00714.09
5.5.150.0030.01114.17
5.5.140.0060.00314.31
5.5.130.0070.00414.18
5.5.120.0090.00614.38
5.5.110.0080.00014.17
5.5.100.0090.00614.27
5.5.90.0030.01214.20
5.5.80.0040.00714.39
5.5.70.0000.01114.41
5.5.60.0100.00314.34
5.5.50.0070.01014.02
5.5.40.0070.00714.36
5.5.30.0070.01014.17
5.5.20.0040.01114.08
5.5.10.0060.00913.97
5.5.00.0040.00714.10
5.4.450.0670.03215.25
5.4.440.0350.03415.36
5.4.430.0380.02815.18
5.4.420.0380.00215.10
5.4.410.0340.00215.25
5.4.400.0370.00315.19
5.4.390.0330.00215.13
5.4.380.0430.00515.04
5.4.370.0320.00415.01
5.4.360.0300.00715.08
5.4.350.0350.00414.98
5.4.340.0060.01711.70
5.4.330.0000.00610.81
5.4.320.0060.01911.75
5.4.310.0030.02311.65
5.4.300.0050.02011.88
5.4.290.0060.02111.78
5.4.280.0060.02411.57
5.4.270.0060.01911.88
5.4.260.0050.02211.59
5.4.250.0070.01711.63
5.4.240.0020.02211.71
5.4.230.0080.01811.67
5.4.220.0040.02211.57
5.4.210.0060.01911.52
5.4.200.0060.02311.70
5.4.190.0060.02111.83
5.4.180.0070.02011.72
5.4.170.0060.02611.74
5.4.160.0050.02111.78
5.4.150.0080.01811.73
5.4.140.0070.02011.63
5.4.130.0060.01911.52
5.4.120.0090.01711.52
5.4.110.0050.02011.61
5.4.100.0030.02411.53
5.4.90.0070.02111.54
5.4.80.0080.01911.49
5.4.70.0020.02411.46
5.4.60.0050.02211.53
5.4.50.0010.02411.50
5.4.40.0040.02211.62
5.4.30.0060.02311.58
5.4.20.0030.02711.51
5.4.10.0040.02711.54
5.4.00.0020.02411.16
5.3.290.0060.04612.80
5.3.280.0090.03812.71
5.3.270.0080.04212.73
5.3.260.0060.03912.72
5.3.250.0060.03712.72
5.3.240.0080.03612.72
5.3.230.0050.04012.71
5.3.220.0080.03612.68
5.3.210.0080.04512.68
5.3.200.0060.04012.68
5.3.190.0060.03812.68
5.3.180.0100.03812.68
5.3.170.0080.03612.67
5.3.160.0030.03912.68
5.3.150.0070.03612.68
5.3.140.0040.04012.66
5.3.130.0040.03912.66
5.3.120.0050.04012.66
5.3.110.0060.03812.66
5.3.100.0060.04112.13
5.3.90.0060.03612.11
5.3.80.0080.04012.11
5.3.70.0060.03612.10
5.3.60.0090.03312.09
5.3.50.0070.03512.04
5.3.40.0070.03812.04
5.3.30.0080.03811.99
5.3.20.0070.03411.77
5.3.10.0040.03711.74
5.3.00.0050.03811.73
5.2.170.0020.0339.23
5.2.160.0080.0279.23
5.2.150.0050.0309.23
5.2.140.0050.0369.23
5.2.130.0050.0299.19
5.2.120.0050.0299.19
5.2.110.0060.0309.20
5.2.100.0030.0349.19
5.2.90.0030.0319.19
5.2.80.0080.0329.18
5.2.70.0020.0339.18
5.2.60.0020.0319.14
5.2.50.0010.0339.11
5.2.40.0040.0299.08
5.2.30.0040.0309.06
5.2.20.0030.0309.04
5.2.10.0080.0248.95
5.2.00.0020.0318.81
5.1.60.0060.0228.10
5.1.50.0040.0258.09
5.1.40.0040.0248.08
5.1.30.0040.0268.43
5.1.20.0030.0278.45
5.1.10.0070.0228.17
5.1.00.0030.0268.17
5.0.50.0050.0186.66
5.0.40.0020.0276.52
5.0.30.0040.0386.33
5.0.20.0050.0196.29
5.0.10.0090.0236.27
5.0.00.0030.0326.27
4.4.90.0040.0144.78
4.4.80.0030.0184.75
4.4.70.0030.0164.75
4.4.60.0030.0184.76
4.4.50.0020.0154.77
4.4.40.0010.0264.70
4.4.30.0010.0174.76
4.4.20.0050.0144.84
4.4.10.0040.0144.85
4.4.00.0040.0294.76
4.3.110.0030.0154.67
4.3.100.0010.0164.67
4.3.90.0030.0184.63
4.3.80.0030.0234.58
4.3.70.0010.0164.63
4.3.60.0020.0154.63
4.3.50.0040.0144.63
4.3.40.0030.0244.54
4.3.30.0030.0153.30
4.3.20.0010.0173.28
4.3.10.0020.0153.23
4.3.00.0030.01312.20

preferences:
96.66 ms | 401 KiB | 5 Q