decoct():octal equivalent of decimal number
string decoct(int $number);
Parameter | DESCRIPTION |
$number | Required : Decimal number as Input to convert to equivalent octal base number. |
The output is string converted to octal base system.
Example : Decimal to octal
<?Php
echo decoct(5); // Output 5
echo "<br>";
echo decoct(55); // Output 67
echo "<br>";
echo decoct(500); // Output is 764
echo "<br>";
echo decoct(658); // Output is 1222
echo "<br>";
echo decoct(3000); // Output is 5670
?>
This article is written by plus2net.com team.
plus2net.com
|