3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arraykey(int|string $arg) : int|string { return $arg; } var_dump([ arraykey("foo") => "foo", arraykey(42) => 42, ]);

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.60.0040.01218.43
8.3.50.0070.01118.54
8.3.40.0040.01118.96
8.3.30.0070.00719.01
8.3.20.0000.00724.18
8.3.10.0070.00024.66
8.3.00.0080.00026.16
8.2.180.0000.01825.92
8.2.170.0180.00418.82
8.2.160.0040.01122.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0040.00426.16
8.2.110.0090.00020.52
8.2.100.0030.00718.42
8.1.280.0140.00025.92
8.1.270.0040.00423.99
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0100.00018.50
8.1.230.0090.00018.57
8.1.30.0050.00317.52

preferences:
43.77 ms | 400 KiB | 5 Q