3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar1 = []; $ar1[3] = 4; $ar1[2] = 3; $ar1[5] = 6; echo json_encode($ar1) . PHP_EOL; $ar2 = array_fill_keys(range(0, 9), null); $ar2[3] = 4; $ar2[2] = 3; $ar2[5] = 6; echo json_encode($ar2) . PHP_EOL; $ar3 = new \SplFixedArray(10); $ar3[3] = 4; $ar3[2] = 3; $ar3[5] = 6; echo json_encode($ar3) . PHP_EOL;

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.120.0100.01018.85
8.3.110.0080.00418.21
8.3.100.0160.00337.54
8.3.90.0390.00737.54
8.3.80.0380.01037.54
8.3.70.0380.01137.54
8.3.60.0390.01137.54
8.3.50.0400.00937.54
8.3.40.0420.00837.54
8.3.30.0240.01237.54
8.3.20.0200.01237.54
8.3.10.0350.00337.54
8.3.00.0350.00637.54
8.2.240.0120.00418.86
8.2.230.0100.00020.94
8.2.220.0130.01337.54
8.2.210.0300.00937.54
8.2.200.0380.01137.54
8.2.190.0290.00737.54
8.2.180.0310.00437.54
8.2.170.0200.00837.54
8.2.160.0270.00037.54
8.2.150.0170.00837.54
8.2.140.0150.00737.54
8.2.130.0210.00037.54
8.2.120.0140.00737.54
8.2.110.0180.00437.54
8.2.100.0130.00737.54
8.2.90.0160.00537.54
8.2.80.0150.00637.54
8.2.70.0140.00737.54
8.2.60.0130.00837.54
8.2.50.0160.00537.54
8.2.40.0140.00537.54
8.2.30.0090.01337.54
8.2.20.0180.00037.54
8.2.10.0130.00437.54
8.2.00.0150.00337.54
8.1.300.0030.00617.97
8.1.290.0140.00437.54
8.1.280.0150.00437.54
8.1.270.0150.00537.54
8.1.260.0160.00337.54
8.1.250.0120.00637.54
8.1.240.0130.00637.54
8.1.230.0150.00637.54
8.1.220.0160.00437.54
8.1.210.0040.01237.54
8.1.200.0120.00737.54
8.1.190.0110.00737.54
8.1.180.0140.00437.54
8.1.170.0120.00337.54
8.1.160.0130.00337.54
8.1.150.0160.00037.54
8.1.140.0070.01037.54
8.1.130.0080.00837.54
8.1.120.0050.01037.54
8.1.110.0090.00637.54
8.1.100.0140.00337.54
8.1.90.0040.01337.54
8.1.80.0100.01037.54
8.1.70.0160.00337.54
8.1.60.0140.00537.54
8.1.50.0120.00837.54
8.1.40.0160.00337.54
8.1.30.0150.00437.54
8.1.20.0180.00337.54
8.1.10.0160.00437.54
8.1.00.0180.00037.54

preferences:
27.09 ms | 403 KiB | 5 Q