3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$formatter = new NumberFormatter('en_RU', NumberFormatter::CURRENCY); //echo $formatter->formatCurrency(10.25, 'RSD'); $parts = explode('.', 'din.10'); $parts[0] = preg_replace("/\D*/", "", $parts[0]); $parts[1] = (1 == count($parts)) ? 0 : preg_replace("/\D*/", "", $parts[1]); var_dump(doubleval($parts[0].".".$parts[1]));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
float(0.1)