3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function per2num($per){return (float)$per/100;} foreach(array("0.58%","5800%","2.57%","25.85%") as $test) echo $test,":\t",per2num($test),"\r\n";
based on 0ohfG
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0.58%: 0.0058 5800%: 58 2.57%: 0.0257 25.85%: 0.2585