In PHP, The decoct() function used for conversion decimal number to an octal number.
PHP decoct() Function Example:
In PHP, The decoct() function used for conversion decimal number to an octal number.
Syntax:
decoct(decimal_number)
where decimal_number is a decimal number passed as argument in this function.
Example:
<?php $return = decoct(1234567); echo "The value of decoct(1234567) is : " . $return . "<br/>"; $return_value = decoct(7890); echo "The value of decoct(7890) is : " . $return_value; ?>
After running example the output is:
The value of decoct(1234567) is : 4553207 The value of decoct(7890) is : 17322
[ 0 ] Comments