programming-examples/php/Math/PHP script to convert scientific notation to an int and a float..php

7 lines
106 B
PHP
Raw Normal View History

2019-11-15 12:59:38 +01:00
<?php
$val = '4.5e3';
$ival = (int) $val;
$fval = (float) $val;
echo $ival."\n";
echo $fval."\n";
?>