- round: documentation ( source)
- var_export: documentation ( source)
- ini_get: documentation ( source)
<?php
$p = 14;
function format($f) {
echo var_export($f, TRUE) . "\n";
return (string) round($f, (int) ini_get('precision'));
}
echo format(20/3) . "\n";
echo format(6.66) . "\n";
echo format(6) . "\n";