<?php
string decoct ( int $num )
where,
$num = The decimal value to be converted to octal
?>
MAXIMUN DECIMAL VALUE | MAXIMUM OCTAL VALUE | bit |
4294967295 | 37777777777 | 32 |
9223372036854775807 | 777777777777777777777 | 64 |
ed48 |
<?php
$nbr01_32m = -4294967294;
$nbr01_32M = 4294967295;
$nbr01_64m = -9223372036854775806;
$nbr01_64M = 9223372036854775807;
$nbr01_l = -1;
$nbr01_L = 1.844674407371E+19;
$nbr01_e = 1498;
$str01 = 'Maxima debetur puero reverentia.';
function dec_oct($var)
{
if(is_numeric($var))
{
echo 'decoct(' . $var . ') =<br>= ';
var_dump(decoct($var));
echo '<br><br>';
}
else
{
echo '"' . $var . '"<br>is NOT a NUMERIC value!<br><br>';
}
}
dec_oct($nbr01_32m);
dec_oct($nbr01_32M);
dec_oct($nbr01_64m);
dec_oct($nbr01_64M);
dec_oct($nbr01_l);
if(PHP_VERSION < 8)
{
dec_oct($nbr01_L);
// Fatal error in PHP 8
}
else
{
echo 'Float value is not allowed.<br><br>';
}
dec_oct($nbr01_e);
// Like the exemple
dec_oct($str01);
?>