3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Collection implements ArrayAccess { protected $items = []; public function __construct(array $items) { $this->items = $items; } public function offsetExists($offset) { return array_key_exists($offset, $this->items); } public function offsetGet($offset) { return $this->items[$offset]; } public function offsetSet($key, $value) { if (is_null($key)) { $this->items[] = $value; } else { $this->items[$key] = $value; } } public function offsetUnset($key) { unset($this->items[$key]); } } $arr = ['a' => null]; $coll = new Collection($arr); var_dump(isset($arr['a']), isset($coll['a']));

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.5.20.0090.00819.69
8.5.10.0110.00718.74
8.5.00.0100.01120.11
8.4.160.0150.00720.58
8.4.150.0020.00114.05
8.4.140.0100.01017.78
8.4.130.0120.00818.69
8.4.120.0070.00319.02
8.4.110.0050.00519.05
8.4.100.0110.01017.72
8.4.90.0100.00720.77
8.4.80.0090.01019.16
8.4.70.0090.00719.07
8.4.60.0080.01220.68
8.4.50.0100.01020.23
8.4.40.0080.00017.79
8.4.30.0090.00918.63
8.4.20.0160.00319.79
8.4.10.0090.00017.77
8.3.290.0110.01020.98
8.3.280.0120.00818.49
8.3.270.0100.00916.77
8.3.260.0110.00916.86
8.3.250.0100.00816.67
8.3.240.0150.00616.61
8.3.230.0100.01016.83
8.3.220.0100.00818.86
8.3.210.0080.01216.66
8.3.200.0040.00516.80
8.3.190.0110.00717.03
8.3.180.0130.00620.98
8.3.170.0090.00917.07
8.3.160.0110.00718.51
8.3.150.0000.01816.72
8.3.140.0050.00316.99
8.3.130.0100.00716.79
8.3.120.0080.00019.00
8.3.110.0210.00918.80
8.3.100.0220.01116.68
8.3.90.0180.00816.73
8.3.80.0160.00517.59
8.3.70.0160.00716.56
8.3.60.0230.00717.53
8.3.50.0100.00921.33
8.3.40.0110.00518.92
8.3.30.0110.00918.01
8.3.20.0110.00219.24
8.3.10.0080.00518.89
8.3.00.0050.00419.13
8.2.300.0130.01120.38
8.2.290.0110.00817.07
8.2.280.0120.00719.02
8.2.270.0150.00316.46
8.2.260.0060.00317.04
8.2.250.0000.00916.68
8.2.240.0060.00317.14
8.2.230.0090.00419.49
8.2.220.0160.00520.33
8.2.210.0120.00221.65
8.2.200.0120.00816.38
8.2.190.0090.01116.56
8.2.180.0170.00016.54
8.2.170.0080.00920.28
8.2.160.0170.00019.41
8.2.150.0070.00920.84
8.2.140.0120.00721.08
8.2.130.0200.00521.83
8.2.120.0210.00321.83
8.2.110.0340.00319.24
8.2.100.0250.00517.61
8.2.90.0160.00817.78
8.2.80.0180.00518.16
8.2.70.0150.00917.37
8.2.60.0200.00117.55
8.2.50.0080.00717.78
8.2.40.0110.00718.69
8.2.30.0060.01018.33
8.2.20.0090.00417.77
8.2.10.0140.00518.32
8.2.00.0180.00318.43
8.1.340.0190.00720.06
8.1.330.0120.00716.17
8.1.320.0100.00916.87
8.1.310.0100.00616.87
8.1.300.0030.00716.23
8.1.290.0130.00317.44
8.1.280.0090.00921.02
8.1.270.0200.00418.89
8.1.260.0160.01421.80
8.1.250.0220.00422.60
8.1.240.0210.00420.04
8.1.230.0230.00319.03
8.1.220.0220.00217.96
8.1.210.0140.01117.81
8.1.200.0210.00717.28
8.1.190.0150.00417.18
8.1.180.0160.00917.66
8.1.170.0200.00417.24
8.1.160.0130.00717.96
8.1.150.0080.00618.02
8.1.140.0180.00817.83
8.1.130.0260.00318.58
8.1.120.0230.00317.32
8.1.110.0200.00417.18
8.1.100.0170.01017.24
8.1.90.0170.00817.29
8.1.80.0220.00317.37
8.1.70.0120.01217.24
8.1.60.0110.01117.48
8.1.50.0160.00517.39
8.1.40.0190.00717.31
8.1.30.0200.00317.51
8.1.20.0150.00617.46
8.1.10.0170.00617.30
8.1.00.0160.00417.40
8.0.300.0150.00717.57
8.0.290.0190.00416.56
8.0.280.0140.00617.44
8.0.270.0190.00317.26
8.0.260.0130.00918.32
8.0.250.0180.00716.81
8.0.240.0230.00416.63
8.0.230.0110.00916.54
8.0.220.0060.00816.59
8.0.210.0090.00516.69
8.0.200.0080.00516.65
8.0.190.0060.00616.74
8.0.180.0100.00316.67
8.0.170.0170.00416.59
8.0.160.0090.00416.71
8.0.150.0120.00216.71
8.0.140.0130.00416.66
8.0.130.0110.00114.85
8.0.120.0070.00616.74
8.0.110.0120.00716.59
8.0.100.0080.00616.62
8.0.90.0150.00316.61
8.0.80.0120.00716.68
8.0.70.0070.00516.72
8.0.60.0120.00916.62
8.0.50.0130.01016.68
8.0.30.0200.00816.81
8.0.20.0160.00916.92
8.0.10.0150.00516.90
8.0.00.0170.00816.79
7.4.330.0130.00515.96
7.4.320.0150.00316.27
7.4.300.0120.01016.38
7.4.290.0170.00716.15
7.4.280.0190.00516.24
7.4.270.0120.00716.38
7.4.260.0170.00414.60
7.4.250.0160.00716.10
7.4.240.0140.00616.40
7.4.230.0190.00216.31
7.4.220.0120.00416.39
7.4.210.0090.01116.44
7.4.200.0160.00916.32
7.4.190.0470.00016.13
7.4.180.0240.01016.38
7.4.160.0250.00416.38
7.4.150.0270.01016.25
7.4.140.0340.00316.23
7.4.130.0140.01116.40
7.4.120.0230.00716.29
7.4.110.0190.00816.37
7.4.100.0210.00616.28
7.4.90.0170.01116.29
7.4.80.0230.00317.75
7.4.70.0170.01216.43
7.4.60.0200.00316.28
7.4.50.0100.01416.26
7.4.40.0210.00616.38
7.4.30.0160.00616.43
7.4.20.0120.00916.27
7.4.10.0140.00716.39
7.4.00.0130.01216.34
7.3.330.0180.00316.14
7.3.320.0180.00414.55
7.3.310.0140.00716.01
7.3.300.0170.00415.93
7.3.290.0140.00916.08
7.3.280.0190.01216.09
7.3.270.0250.01215.75
7.3.260.0170.01016.26
7.3.250.0140.02116.13
7.3.240.0140.00916.32
7.3.230.0160.01016.12
7.3.220.0320.00616.00
7.3.210.0210.00516.16
7.3.200.0240.00616.06
7.3.190.0150.01416.20
7.3.180.0140.01015.94
7.3.170.0170.00716.04
7.3.160.0190.00516.10
7.3.150.0160.00716.17
7.3.140.0150.00916.12
7.3.130.0170.00716.17
7.3.120.0140.01016.12
7.3.110.0190.00716.03
7.3.100.0140.01016.19
7.3.90.0150.00816.23
7.3.80.0190.00516.13
7.3.70.0140.00916.16
7.3.60.0160.00916.18
7.3.50.0160.00816.23
7.3.40.0190.00516.08
7.3.30.0180.00716.32
7.3.20.0130.01316.78
7.3.10.0240.00616.66
7.3.00.0180.00716.73
7.2.340.0270.00716.13
7.2.330.0140.01016.55
7.2.320.0230.00516.24
7.2.310.0140.00616.31
7.2.300.0130.00516.23
7.2.290.0100.00716.18
7.2.280.0110.00716.48
7.2.270.0100.00816.45
7.2.260.0100.00816.47
7.2.250.0110.00716.33
7.2.240.0110.00716.34
7.2.230.0130.00716.39
7.2.220.0130.00716.29
7.2.210.0100.00916.53
7.2.200.0170.00316.37
7.2.190.0120.00916.29
7.2.180.0160.00716.45
7.2.170.0150.01016.50
7.2.160.0160.01316.54
7.2.150.0150.01417.00
7.2.140.0160.00916.98
7.2.130.0200.00717.13
7.2.120.0180.00817.10
7.2.110.0170.00616.94
7.2.100.0180.00917.04
7.2.90.0170.00717.02
7.2.80.0160.01216.94
7.2.70.0150.01017.27
7.2.60.0140.01016.94
7.2.50.0160.00817.18
7.2.40.0170.00817.05
7.2.30.0140.01117.18
7.2.20.0150.00817.03
7.2.10.0140.00917.17
7.2.00.0180.00617.18

preferences:
86.46 ms | 403 KiB | 5 Q