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






octdec: convert octal number to decimal 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.decoct: convert decimal number to octal number