3v4l.org

run code in 500+ PHP versions simultaneously
<?php function calculateTotal(string $item, float $price, int $quantity = 1): string { $subtotal = $price * $quantity; return "$quantityx $item = $$subtotal"; } // Call the function and print the result echo calculateTotal($item, $price, $quantity);

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.5.30.0110.00719.17
8.5.20.0320.00616.75
8.5.10.0300.01116.67
8.5.00.0360.00716.67
8.4.180.0420.01219.54
8.4.170.0340.01019.59
8.4.160.0230.00919.69
8.4.150.0360.00819.46
8.4.140.0340.01417.73
8.4.130.0350.00817.77
8.4.120.0400.00617.98
8.4.110.0410.00917.63
8.4.100.0390.00817.89
8.4.90.0410.00917.84
8.4.80.0340.01618.05
8.4.70.0390.00817.86
8.4.60.0370.01017.88
8.4.50.0400.00817.91
8.4.40.0360.01217.78
8.4.30.0410.00817.61
8.4.20.0380.01217.68
8.4.10.0440.00717.67
8.3.300.0320.01118.38
8.3.290.0330.00918.18
8.3.280.0420.01018.43
8.3.270.0390.00916.67
8.3.260.0330.00716.67
8.3.250.0360.00916.67
8.3.240.0370.00816.67
8.3.230.0400.00516.67
8.3.220.0380.00816.67
8.3.210.0420.00616.67
8.3.200.0370.00816.67
8.3.190.0350.00916.73
8.3.180.0350.00816.74
8.3.170.0410.00716.67
8.3.160.0330.01316.67
8.3.150.0380.00916.67
8.3.140.0380.00816.67
8.3.130.0300.01216.68
8.3.120.0310.01316.73
8.3.110.0320.00916.67
8.3.100.0410.00916.87
8.3.90.0360.01216.67
8.3.80.0360.01116.67
8.3.70.0380.01016.71
8.3.60.0370.00916.67
8.3.50.0360.01216.83
8.3.40.0390.00717.79
8.3.30.0300.00817.84
8.3.20.0320.00817.89
8.3.10.0280.01618.03
8.3.00.0240.00917.97

preferences:
50.01 ms | 726 KiB | 5 Q