3v4l.org

run code in 300+ PHP versions simultaneously
<?php function arrayWithThree($b=[]) { return [...$b, 3]; } function appendWithReassign($c = []) { return arrayWithThree($c1 = []); } function appendWithoutReassign($c = []) { return arrayWithThree($c); } $a= [1]; echo 'a with three: '.var_export(appendWithReassign($a), true) . ' without reassign: '.var_export(appendWithoutReassign($a), true);

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.4.130.0050.00418.84
8.4.120.0060.00423.79
8.4.110.0090.01220.55
8.4.100.0100.01117.73
8.4.90.0140.00617.52
8.4.80.0130.00719.52
8.4.70.0090.00318.18
8.4.60.0080.00518.18
8.4.50.0090.00318.18
8.4.40.0090.00518.18
8.4.30.0090.00418.18
8.4.20.0070.00718.18
8.4.10.0080.00718.18
8.3.260.0100.00816.31
8.3.250.0050.00318.84
8.3.240.0120.00716.99
8.3.230.0090.00916.73
8.3.220.0050.00316.61
8.3.210.0080.00318.18
8.3.200.0060.00618.18
8.3.190.0080.00418.18
8.3.180.0050.00618.18
8.3.170.0100.00218.18
8.3.160.0090.00318.18
8.3.150.0060.00618.18
8.3.140.0060.00618.18
8.3.130.0070.00518.18
8.3.120.0080.00518.18
8.3.110.0100.00218.18
8.3.100.0120.00018.18
8.3.90.0070.00618.18
8.3.80.0090.00418.18
8.3.70.0070.00718.18
8.3.60.0060.00618.18
8.3.50.0030.00718.57
8.3.40.0050.00518.18
8.3.30.0060.00518.18
8.3.20.0040.00618.18
8.3.10.0100.00218.18
8.3.00.0050.00518.18
8.2.290.0110.00720.36
8.2.280.0080.00418.18
8.2.270.0060.00518.18
8.2.260.0060.00718.18
8.2.250.0060.00518.18
8.2.240.0110.00418.18
8.2.230.0140.00318.18
8.2.220.0090.00518.18
8.2.210.0120.00418.18
8.2.200.0140.00518.18
8.2.190.0120.00418.18
8.2.180.0120.00418.18
8.2.170.0160.00218.18
8.2.160.0120.00518.18
8.2.150.0070.00418.18
8.2.140.0120.00418.18
8.2.130.0130.00318.18
8.2.120.0130.00318.18
8.2.110.0150.00318.18
8.2.100.0130.00418.18
8.2.90.0130.00318.18
8.2.80.0130.00518.18
8.2.70.0120.00518.18
8.2.60.0130.00318.18
8.2.50.0120.00618.18
8.2.40.0110.00618.18
8.2.30.0140.00518.18
8.2.20.0120.00418.18
8.2.10.0120.00318.18
8.2.00.0110.00418.18

preferences:
27.2 ms | 403 KiB | 5 Q