decoct: convert decimal number to octal number : Octal Number « Data Type « PHP






decoct: convert decimal number to octal number

<?php
$orig_dec = 34672;
$dec2oct = decoct($orig_dec);
$oct2dec = octdec($dec2oct);
echo "original decimal number: $orig_dec <br>";
echo "new octal number: $dec2oct <br>";
echo "back to decimal: $oct2dec <br>";
?>

           
       








Related examples in the same category

1.octdec: convert octal number to decimal number