3v4l.org

run code in 300+ PHP versions simultaneously
<?php function accept_array($a) : void { var_dump($a); unset($a); } function return_array() { return new class implements ArrayAccess { public function offsetExists(mixed $offset): bool { return true; } public function offsetGet(mixed $offset): mixed { return 42; } public function offsetSet(mixed $offset, mixed $value): void {} public function offsetUnset(mixed $offset): void {} }; } $input = return_array(); if (isset($input['key'])) { accept_array($input); }

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.110.0060.00320.94
8.3.100.0040.01116.78
8.3.90.0060.00326.77
8.3.80.0090.00016.50
8.3.70.0080.00818.18
8.3.60.0120.00616.48
8.3.50.0100.01018.43
8.3.40.0100.00320.04
8.3.30.0100.01018.56
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0040.00426.16
8.2.230.0030.00622.58
8.2.220.0100.01024.06
8.2.210.0030.00526.77
8.2.200.0080.00316.63
8.2.190.0130.00316.88
8.2.180.0150.00616.35
8.2.170.0040.01118.95
8.2.160.0040.01122.96
8.2.150.0030.00525.66
8.2.140.0080.00024.66
8.2.130.0000.00926.16
8.2.120.0070.00026.16
8.2.110.0090.00019.31
8.2.100.0120.00018.03
8.2.90.0030.00519.07
8.2.80.0050.00517.97
8.2.70.0040.00417.61
8.2.60.0060.00317.63
8.2.50.0030.00617.75
8.2.40.0030.00517.63
8.2.30.0000.00717.83
8.2.20.0050.00319.37
8.2.10.0030.00518.09
8.2.00.0140.00317.63
8.1.290.0100.00030.84
8.1.280.0120.00425.92
8.1.270.0040.00424.66
8.1.260.0060.00326.35
8.1.250.0070.00028.09
8.1.240.0030.00622.81
8.1.230.0040.00717.82
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0080.00017.38
8.1.190.0030.00517.22
8.1.180.0050.00318.10
8.1.170.0000.01118.55
8.1.160.0070.00418.97
8.1.150.0040.00418.70
8.1.140.0000.00717.38
8.1.130.0150.00417.41
8.1.120.0140.00417.55
8.1.110.0110.00617.52
8.1.100.0120.00517.52
8.1.90.0120.00517.53
8.1.80.0170.00017.57
8.1.70.0080.00817.52
8.1.60.0090.00917.70
8.1.50.0160.00317.54
8.1.40.0090.00917.70
8.1.30.0140.00517.66
8.1.20.0120.00617.67
8.1.10.0190.00017.51
8.1.00.0130.00517.57
8.0.300.0020.00518.77
8.0.290.0020.00516.75
8.0.280.0070.00018.08
8.0.270.0040.00417.98
8.0.260.0150.00217.41
8.0.250.0090.00617.41
8.0.240.0090.00917.41
8.0.230.0150.00217.41
8.0.220.0210.00317.41
8.0.210.0160.00017.41
8.0.200.0100.00517.41
8.0.190.0110.00517.41
8.0.180.0080.00817.41
8.0.170.0090.00617.41
8.0.160.0090.00717.41
8.0.150.0050.01017.41
8.0.140.0110.00417.41
8.0.130.0130.00317.41
8.0.120.0120.00317.41
8.0.110.0160.00017.41
8.0.100.0150.00017.41
8.0.90.0100.00517.41
8.0.80.0160.00017.41
8.0.70.0150.00017.41
8.0.60.0130.00317.41
8.0.50.0090.00617.41
8.0.30.0120.00417.41
8.0.20.0110.00517.41
8.0.10.0080.00817.41

preferences:
28.48 ms | 403 KiB | 5 Q