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('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.70.0110.00416.50
8.3.60.0090.00618.33
8.3.50.0060.01221.02
8.3.40.0040.01118.84
8.3.30.0090.01219.27
8.3.20.0080.00020.24
8.3.10.0080.00023.65
8.3.00.0090.00019.38
8.2.180.0130.00616.88
8.2.170.0070.01422.96
8.2.160.0070.00720.55
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00021.04
8.2.110.0070.00320.34
8.2.100.0090.00318.22
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0030.00517.63
8.2.60.0080.00017.93
8.2.50.0090.00018.07
8.2.40.0050.00319.88
8.2.30.0040.00418.13
8.2.20.0050.00217.69
8.2.10.0000.00718.01
8.2.00.0020.00517.74
8.1.280.0070.00725.92
8.1.270.0090.00022.19
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0100.00023.63
8.1.230.0110.00018.98
8.1.220.0000.00817.78
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0050.00317.25
8.1.180.0040.00418.10
8.1.170.0030.00518.50
8.1.160.0040.00422.02
8.1.150.0070.00018.96
8.1.140.0070.00317.45
8.1.130.0000.00717.85
8.1.120.0000.00817.46
8.1.110.0000.00717.53
8.1.100.0040.00417.39
8.1.90.0070.00017.45
8.1.80.0040.00417.38
8.1.70.0000.00717.41
8.1.60.0060.00317.42
8.1.50.0040.00417.55
8.1.40.0030.00517.46
8.1.30.0030.00617.68
8.1.20.0030.00517.70
8.1.10.0040.00417.57
8.1.00.0040.00417.40
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00718.37
8.0.270.0030.00317.27
8.0.260.0000.00817.32
8.0.250.0000.00717.01
8.0.240.0080.00016.88
8.0.230.0030.00317.04
8.0.220.0030.00316.94
8.0.210.0000.00816.97
8.0.200.0030.00317.03
8.0.190.0040.00417.04
8.0.180.0070.00016.99
8.0.170.0040.00416.98
8.0.160.0030.00616.87
8.0.150.0000.00716.88
8.0.140.0000.00716.93
8.0.130.0060.00013.39
8.0.120.0070.00016.86
8.0.110.0000.00717.01
8.0.100.0050.00216.94
8.0.90.0040.00417.00
8.0.80.0040.01116.96
8.0.70.0040.00416.84
8.0.60.0070.00016.91
8.0.50.0040.00416.81
8.0.30.0090.01117.05
8.0.20.0090.00917.42
8.0.10.0000.00717.09
8.0.00.0090.00916.73
7.4.330.0020.00215.00
7.4.320.0000.00816.62
7.4.300.0040.00416.61
7.4.290.0070.00016.52
7.4.280.0000.00716.64
7.4.270.0000.00816.54
7.4.260.0030.00316.45
7.4.250.0000.00816.57
7.4.240.0030.00316.56
7.4.230.0040.00416.68
7.4.220.0090.01216.55
7.4.210.0090.00616.48
7.4.200.0000.00716.63
7.4.160.0060.00916.58
7.4.150.0060.01217.40
7.4.140.0120.00517.86
7.4.130.0120.00516.56
7.4.120.0140.00516.55
7.4.110.0130.00316.55
7.4.100.0110.01116.45
7.4.90.0170.00816.54
7.4.80.0120.01219.39
7.4.70.0030.01316.45
7.4.60.0060.01016.58
7.4.50.0050.00516.64
7.4.40.0070.01416.59
7.4.30.0070.01116.66
7.4.10.0140.00315.05
7.4.00.0060.00914.84
7.3.330.0050.00013.20
7.3.320.0000.00513.11
7.3.310.0000.00716.23
7.3.300.0000.00616.29
7.3.290.0120.00616.23
7.3.280.0060.01316.20
7.3.270.0070.01017.40
7.3.260.0120.00316.30
7.3.250.0100.01116.43
7.3.240.0120.01116.48
7.3.230.0090.00916.39
7.3.210.0080.01116.15
7.3.200.0140.03019.39
7.3.190.0000.01716.52
7.3.180.0030.01216.33
7.3.170.0060.01116.36
7.3.160.0080.00816.52
7.3.130.0030.01314.70
7.3.120.0150.00314.79
7.3.110.0100.00714.80
7.3.100.0040.01114.90
7.3.90.0070.00714.71
7.3.80.0110.00714.86
7.3.70.0040.01214.42
7.3.60.0000.01514.74
7.3.50.0100.00614.68
7.3.40.0040.01014.65
7.3.30.0090.00614.70
7.3.20.0050.00516.54
7.3.10.0050.00916.46
7.3.00.0080.00816.56
7.2.330.0070.01016.74
7.2.320.0070.01116.63
7.2.310.0160.00616.40
7.2.300.0030.01216.65
7.2.290.0110.01116.58
7.2.260.0070.01314.83
7.2.250.0070.01114.74
7.2.240.0070.01115.00
7.2.230.0100.01014.98
7.2.220.0070.01114.73
7.2.210.0110.00414.89
7.2.200.0090.00614.89
7.2.190.0060.00315.07
7.2.180.0000.01014.96
7.2.170.0120.00615.10
7.2.160.0100.00014.90
7.2.150.0000.01216.93
7.2.140.0040.01116.82
7.2.130.0090.01016.83
7.2.120.0030.00916.76
7.2.110.0130.00516.92
7.2.100.0000.01616.78
7.2.90.0070.00816.86
7.2.80.0070.00916.73
7.2.70.0060.00816.64
7.2.60.0030.01016.85
7.2.50.0170.00516.63
7.2.40.0040.01016.60
7.2.30.0090.00516.73
7.2.20.0120.01016.85
7.2.10.0110.00916.74
7.2.00.0110.00716.79
7.1.330.0070.01015.93
7.1.320.0000.00915.51
7.1.310.0040.01215.83
7.1.300.0120.00316.04
7.1.290.0040.01215.62
7.1.280.0090.00915.96
7.1.270.0060.00315.48
7.1.260.0060.00915.89
7.1.250.0050.00715.58
7.1.240.0040.00815.57
7.1.230.0040.01115.61
7.1.220.0090.00015.89
7.1.210.0030.01015.88
7.1.200.0030.00615.92
7.1.190.0110.00315.64
7.1.180.0100.00715.62
7.1.170.0000.01515.83
7.1.160.0100.00315.71
7.1.150.0050.01115.69
7.1.140.0030.01315.74
7.1.130.0030.00715.71
7.1.120.0030.00615.88
7.1.110.0100.00315.69
7.1.100.0040.01215.80
7.1.90.0090.00015.91
7.1.80.0040.00715.96
7.1.70.0090.00316.50
7.1.60.0070.00716.61
7.1.50.0170.01125.34
7.1.40.0030.01015.68
7.1.30.0040.01515.86
7.1.20.0070.01115.74
7.1.10.0100.00715.86
7.1.00.0030.04319.07
7.0.330.0000.01015.56
7.0.320.0030.01015.57
7.0.310.0040.01115.54
7.0.300.0000.01515.37
7.0.290.0000.01115.11
7.0.280.0030.01015.37
7.0.270.0000.01015.47
7.0.260.0000.01215.48
7.0.250.0030.01015.50
7.0.240.0000.01315.42
7.0.230.0000.00915.50
7.0.220.0070.00715.51
7.0.210.0000.01315.11
7.0.200.0130.00216.19
7.0.190.0040.00815.41
7.0.180.0040.00415.48
7.0.170.0100.00715.55
7.0.160.0030.01415.19
7.0.150.0000.01615.45
7.0.140.0060.03718.81
7.0.130.0090.00615.46
7.0.120.0100.00315.13
7.0.110.0030.01115.21
7.0.100.0030.00815.44
7.0.90.0000.01215.12
7.0.80.0030.00915.38
7.0.70.0070.00715.16
7.0.60.0130.03717.76
7.0.50.0080.04216.71
7.0.40.0070.02516.81
7.0.30.0170.03816.80
7.0.20.0130.03316.82
7.0.10.0050.02416.88
7.0.00.0080.04216.81
5.6.400.0090.00614.54
5.6.390.0070.00414.27
5.6.380.0030.00914.49
5.6.370.0030.00614.44
5.6.360.0040.00814.30
5.6.350.0100.00314.13
5.6.340.0030.00613.92
5.6.330.0060.00614.04
5.6.320.0100.00614.47
5.6.310.0030.01414.48
5.6.300.0060.00914.63
5.6.290.0000.01214.46
5.6.280.0030.04317.69
5.6.270.0090.00614.50
5.6.260.0080.00414.25
5.6.250.0060.00314.19
5.6.240.0040.00714.12
5.6.230.0060.00914.20
5.6.220.0060.00914.35
5.6.210.0140.03617.38
5.6.200.0030.05016.38
5.6.190.0050.03617.25
5.6.180.0130.04817.40
5.6.170.0220.03117.35
5.6.160.0100.04217.47
5.6.150.0050.03316.20
5.6.140.0050.04316.30
5.6.130.0060.04316.17
5.6.120.0050.02217.57
5.6.110.0110.04417.62
5.6.100.0100.04317.55
5.6.90.0080.01817.65
5.6.80.0090.03517.36
5.6.70.0030.01014.50
5.6.60.0130.00014.51
5.6.50.0030.00914.38
5.6.40.0000.00914.08
5.6.30.0060.00314.18
5.6.20.0120.00414.20
5.6.10.0050.00514.44
5.6.00.0100.00314.32
5.5.380.0100.01214.25
5.5.370.0220.00014.52
5.5.360.0060.01214.47
5.5.350.0060.04817.24
5.5.340.0100.04316.10
5.5.330.0080.02317.45
5.5.320.0180.02617.41
5.5.310.0120.03317.27
5.5.300.0030.04615.97
5.5.290.0040.04616.16
5.5.280.0130.02017.58
5.5.270.0070.03417.53
5.5.260.0060.04017.46
5.5.250.0050.02717.33
5.5.240.0100.03717.18
5.5.230.0030.01313.93
5.5.220.0060.00314.30
5.5.210.0090.00613.89
5.5.200.0060.00614.09
5.5.190.0110.00714.59
5.5.180.0090.00914.23
5.5.170.0050.01114.39
5.5.160.0120.00814.16
5.5.150.0080.01114.22
5.5.140.0050.00813.98
5.5.130.0100.00714.25
5.5.120.0030.00614.33
5.5.110.0030.01114.28
5.5.100.0030.01014.40
5.5.90.0050.00514.50
5.5.80.0060.00614.07
5.5.70.0000.01313.98
5.5.60.0030.00914.41
5.5.50.0030.00614.05
5.5.40.0000.01214.53
5.5.30.0000.01114.32
5.5.20.0060.00314.36
5.5.10.0060.00614.07
5.5.00.0070.00714.28
5.4.450.0020.03715.16
5.4.440.0470.03615.24
5.4.430.0400.03515.29
5.4.420.0330.00215.25
5.4.410.0470.00215.35
5.4.400.0370.00215.08
5.4.390.0360.00315.16
5.4.380.0330.00615.05
5.4.370.0350.00315.16
5.4.360.0300.00515.10
5.4.350.0420.00415.01
5.4.340.0070.02111.34
5.4.330.0030.00710.95
5.4.320.0040.02411.61
5.4.310.0050.02511.70
5.4.300.0090.01911.80
5.4.290.0050.02411.90
5.4.280.0030.02611.61
5.4.270.0050.02111.54
5.4.260.0040.02211.83
5.4.250.0050.02211.58
5.4.240.0040.02211.54
5.4.230.0080.02011.65
5.4.220.0060.01911.64
5.4.210.0060.02011.67
5.4.200.0090.02611.64
5.4.190.0060.02511.71
5.4.180.0040.02411.71
5.4.170.0050.02311.68
5.4.160.0050.02111.71
5.4.150.0030.02411.81
5.4.140.0050.02311.52
5.4.130.0050.02211.52
5.4.120.0060.02611.63
5.4.110.0040.02411.54
5.4.100.0020.02411.46
5.4.90.0040.02411.51
5.4.80.0060.02211.49
5.4.70.0070.02211.51
5.4.60.0050.02011.42
5.4.50.0070.02011.61
5.4.40.0060.01911.48
5.4.30.0030.02311.53
5.4.20.0040.02111.40
5.4.10.0080.01911.50
5.4.00.0040.02311.26
5.3.290.0080.04212.80
5.3.280.0060.04012.71
5.3.270.0030.04212.72
5.3.260.0050.04212.72
5.3.250.0050.03912.72
5.3.240.0050.03812.72
5.3.230.0080.03612.71
5.3.220.0060.03912.68
5.3.210.0050.03812.68
5.3.200.0070.03512.68
5.3.190.0050.03812.68
5.3.180.0120.04112.68
5.3.170.0060.03512.67
5.3.160.0080.03712.67
5.3.150.0070.03812.67
5.3.140.0060.03612.66
5.3.130.0050.03912.66
5.3.120.0070.03812.66
5.3.110.0040.04912.66
5.3.100.0080.03812.13
5.3.90.0090.04212.11
5.3.80.0090.03812.12
5.3.70.0050.03712.11
5.3.60.0080.04112.09
5.3.50.0070.04012.04
5.3.40.0030.04312.04
5.3.30.0070.03411.99
5.3.20.0040.03611.77
5.3.10.0060.03311.74
5.3.00.0050.03811.73
5.2.170.0080.0299.23
5.2.160.0070.0279.23
5.2.150.0030.0329.23
5.2.140.0060.0299.23
5.2.130.0040.0309.19
5.2.120.0060.0279.19
5.2.110.0040.0309.20
5.2.100.0050.0289.19
5.2.90.0060.0299.19
5.2.80.0030.0329.18
5.2.70.0050.0309.19
5.2.60.0050.0309.14
5.2.50.0050.0299.11
5.2.40.0050.0289.08
5.2.30.0050.0299.06
5.2.20.0050.0289.05
5.2.10.0060.0278.95
5.2.00.0060.0288.81
5.1.60.0050.0238.10
5.1.50.0040.0248.09
5.1.40.0070.0248.08
5.1.30.0060.0248.43
5.1.20.0070.0238.45
5.1.10.0010.0298.18
5.1.00.0050.0248.18
5.0.50.0020.0226.66
5.0.40.0040.0186.52
5.0.30.0040.0306.33
5.0.20.0020.0206.30
5.0.10.0030.0206.28
5.0.00.0030.0316.27
4.4.90.0040.0184.78
4.4.80.0050.0134.75
4.4.70.0020.0184.75
4.4.60.0030.0154.76
4.4.50.0020.0164.77
4.4.40.0020.0264.71
4.4.30.0000.0184.76
4.4.20.0040.0144.85
4.4.10.0070.0124.85
4.4.00.0030.0254.75
4.3.110.0020.0164.67
4.3.100.0010.0164.66
4.3.90.0050.0124.63
4.3.80.0040.0234.59
4.3.70.0020.0154.63
4.3.60.0040.0134.62
4.3.50.0040.0144.63
4.3.40.0020.0254.53
4.3.30.0030.0153.30
4.3.20.0010.0173.28
4.3.10.0000.0183.23
4.3.00.0170.0207.19

preferences:
39.32 ms | 401 KiB | 5 Q