3v4l.org

run code in 300+ PHP versions simultaneously
<?php $valore = 300,01; $numchar = 5; $s = str_replace(".", "", sprintf("%0".$numchar."f", $valore)); echo $s;

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)
5.4.270.0100.07018.95
5.4.260.0170.06018.80
5.4.250.0200.04318.94
5.4.240.0170.06719.02
5.4.230.0070.05318.80
5.4.220.0130.05318.98
5.4.210.0070.06018.90
5.4.200.0130.06718.95
5.4.190.0170.06718.73
5.4.180.0170.05318.79
5.4.170.0170.07018.75
5.4.160.0170.07018.82
5.4.150.0170.06019.00
5.4.140.0130.04716.39
5.4.130.0130.04716.46
5.4.120.0200.06716.42
5.4.110.0100.04716.47
5.4.100.0100.04716.41
5.4.90.0070.07016.65
5.4.80.0030.05316.31
5.4.70.0070.07716.47
5.4.60.0100.04316.46
5.4.50.0130.04716.48
5.4.40.0230.05316.40
5.4.30.0130.04716.43
5.4.20.0100.05016.62
5.4.10.0170.05316.29
5.4.00.0070.05015.84
5.3.280.0100.06014.70
5.3.270.0130.06314.61
5.3.260.0130.04714.48
5.3.250.0200.04014.30
5.3.240.0170.06714.61
5.3.230.0030.07714.32
5.3.220.0100.05314.41
5.3.210.0200.05714.41
5.3.200.0170.05714.49
5.3.190.0070.05014.72
5.3.180.0100.07314.58
5.3.170.0200.05014.57
5.3.160.0100.07014.71
5.3.150.0070.08314.34
5.3.140.0170.07714.57
5.3.130.0130.06314.54
5.3.120.0100.06014.32
5.3.110.0030.06714.25
5.3.100.0070.05013.91
5.3.90.0100.06713.79
5.3.80.0100.07314.18
5.3.70.0130.04314.04
5.3.60.0100.04714.02
5.3.50.0170.06313.82
5.3.40.0070.05713.96
5.3.30.0230.05013.76
5.3.20.0030.06313.71
5.3.10.0200.04013.43
5.3.00.0170.06713.66
5.2.170.0030.06010.90
5.2.160.0170.04311.25
5.2.150.0030.05711.23
5.2.140.0070.05011.16
5.2.130.0170.04011.12
5.2.120.0100.04011.00
5.2.110.0070.04711.00
5.2.100.0130.04711.11
5.2.90.0100.03711.00
5.2.80.0070.04011.04
5.2.70.0100.05710.99
5.2.60.0130.03311.15
5.2.50.0030.04711.03
5.2.40.0000.06010.99
5.2.30.0030.06010.74
5.2.20.0030.04310.72
5.2.10.0100.05011.02
5.2.00.0070.03710.62
5.1.60.0070.0379.93
5.1.50.0030.05310.18
5.1.40.0030.04310.21
5.1.30.0030.04010.09
5.1.20.0070.03710.57
5.1.10.0100.05010.16
5.1.00.0030.03710.29
5.0.50.0070.0309.03
5.0.40.0030.0339.03
5.0.30.0030.0439.03
5.0.20.0130.0309.03
5.0.10.0000.0309.03
5.0.00.0030.0579.03
4.4.90.0030.0239.03
4.4.80.0070.0279.03
4.4.70.0130.0139.03
4.4.60.0030.0309.03
4.4.50.0000.0239.03
4.4.40.0000.0379.03
4.4.30.0100.0139.03
4.4.20.0030.0309.03
4.4.10.0000.0309.03
4.4.00.0070.0309.03
4.3.110.0070.0209.03
4.3.100.0070.0279.03
4.3.90.0100.0179.03
4.3.80.0000.0379.03
4.3.70.0030.0279.03
4.3.60.0000.0339.03
4.3.50.0030.0279.03
4.3.40.0000.0479.03
4.3.30.0000.0239.03
4.3.20.0070.0179.03
4.3.10.0000.0239.03
4.3.00.0030.0236.11

preferences:
142.67 ms | 1394 KiB | 7 Q