I'm implementing a function that converts float numbers to strings.
function exp2int($exp) {
list($mantissa, $exponent) = spliti("e", $exp);
if($exponent=='') return $exp;
list($int, $dec) = split("\.", $mantissa);
bcscale (abs($exponent - strlen($dec)));
return bcmul($mantissa, bcpow("10", $exponent));
}
This is an example:
$n = 2.777777778e-10;
echo exp2int($n);
Returns:
0.0000000002777777778
My server is running Php 5.4, and since split and spliti are deprecated since Php 5.3, I get these messages:
Deprecated: Function spliti() is deprecated
Deprecated: Function split() is deprecated
How can I replace those functions in my exp2int function (without the use of @)? Thanks!