3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function __construct(public int $id) {} } class Admin { public function __construct(public int $id) {} } /** * @param User[] $users */ function deleteUsers(array $users) { $typedArray = (fn (User ...$users) => $users)(...$users); foreach ($typedArray as $user) { var_dump($user->id); } } deleteUsers([new User(1), new User(2), new User(3)]); deleteUsers([new User(4), new Admin(5), new User(6)]);

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.130.0100.00018.30
8.3.120.0070.00419.09
8.3.110.0060.00320.94
8.3.100.0130.00937.54
8.3.90.0230.00037.54
8.3.80.0180.00837.54
8.3.70.0280.00037.54
8.3.60.0200.00437.54
8.3.50.0180.00737.54
8.3.40.0180.00437.54
8.3.30.0180.00537.54
8.3.20.0180.00437.54
8.3.10.0230.00037.54
8.3.00.0220.00037.54
8.2.250.0060.00616.95
8.2.240.0090.00618.83
8.2.230.0060.00322.58
8.2.220.0180.00037.54
8.2.210.0100.01037.54
8.2.200.0160.00437.54
8.2.190.0120.00937.54
8.2.180.0120.00937.54
8.2.170.0250.00037.54
8.2.160.0120.01237.54
8.2.150.0230.00037.54
8.2.140.0160.00537.54
8.2.130.0220.00437.54
8.2.120.0130.00837.54
8.2.110.0150.00637.54
8.2.100.0160.00837.54
8.2.90.0150.00637.54
8.2.80.0210.00337.54
8.2.70.0150.00537.54
8.2.60.0200.00037.54
8.2.50.0200.00337.54
8.2.40.0100.01037.54
8.2.30.0200.00337.54
8.2.20.0130.00837.54
8.2.10.0200.00037.54
8.2.00.0180.00337.54
8.1.300.0030.00517.91
8.1.290.0190.00637.54
8.1.280.0120.00837.54
8.1.270.0210.00037.54
8.1.260.0200.00037.54
8.1.250.0140.00837.54
8.1.240.0150.00537.54
8.1.230.0150.00337.54
8.1.220.0150.00437.54
8.1.210.0130.00637.54
8.1.200.0090.00937.54
8.1.190.0130.00637.54
8.1.180.0160.00537.54
8.1.170.0180.00337.54
8.1.160.0150.00337.54
8.1.150.0150.01037.54
8.1.140.0240.00037.54
8.1.130.0170.00737.54
8.1.120.0190.00037.54
8.1.110.0180.00037.54
8.1.100.0200.00037.54
8.1.90.0130.00537.54
8.1.80.0120.01237.54
8.1.70.0180.00437.54
8.1.60.0190.00437.54
8.1.50.0220.00637.54
8.1.40.0150.00537.54
8.1.30.0170.00337.54
8.1.20.0220.00037.54
8.1.10.0200.00037.54
8.1.00.0160.00537.54

preferences:
27.37 ms | 403 KiB | 5 Q