3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rate1 = 0.02; $var = sprintf("%.2f",1260); echo $var,"\n\n"; $product = $var * $rate1; var_dump("product: $product); // two ways to format $product echo number_format( $product, 2),"\n"; echo printf("%.2f",$product);

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)
7.1.70.0090.00616.77
7.1.60.0140.01434.96
7.1.50.0140.01134.61
7.1.40.0120.01234.29
7.1.30.0110.01434.34
7.1.20.0090.01634.42
7.1.10.0000.01216.38
7.1.00.0040.01116.57
7.0.200.0040.00816.40
7.0.190.0030.00816.46
7.0.180.0000.01116.08
7.0.170.0040.00715.96
7.0.160.0040.00716.02
7.0.150.0000.01216.24
7.0.140.0050.00516.15
7.0.130.0000.01216.34
7.0.120.0000.01116.44
7.0.110.0090.00316.15
7.0.100.0030.00915.88
7.0.90.0040.00816.01
7.0.80.0060.00616.11
7.0.70.0060.00616.27
7.0.60.0000.01315.81
7.0.50.0030.00816.08
7.0.40.0060.01016.09
7.0.30.0060.00916.33
7.0.20.0080.00316.33
7.0.10.0030.00916.14
7.0.00.0060.00616.27

preferences:
139.62 ms | 1394 KiB | 7 Q