- error_reporting: documentation ( source)
- explode: documentation ( source)
- trim: documentation ( source)
<?php
error_reporting(0);
function x($v){
$argv[1] = $v;
echo strlen((explode('.',$t=trim('-'==($_=$argv[1])[0]?$n=$_=trim($_,'-'):$_,0)))[1]).($t!==$_?($n?' -':' ').$t:'');
echo "\n";
echo strlen((explode('.',$t=trim('-'==($_=$argv[1])[0]?$n=$_=trim($_,'-'):$_,0)))[1]).($t!==$_?($n?' -':' ').('.'==$t[0]?0:'').$t:'');
echo "\n";
}
x('-12.32');
x('32');
x('3231.432');
x('-34.0');
x('023');
x('00324.230');
x('10');
x('00.3');
x('0');
x('-0');
x('-04.8330');
x('-000000000012345678901234567890000.000012345678901234567890000');