3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function per2num($per){return (float)$per/100;} foreach(array("0.58%","25%","2.01%","25.00%") as $test) echo $test,":\t",per2num($test),"\r\n";
based on oPLAY
Output for 4.3.0 - 7.1.0
0.58%: 0.0058 25%: 0.25 2.01%: 0.0201 25.00%: 0.25