Decimal to Octal tool convert decimal string to octal string. Many times we wants to convert decimal to octal that time we can use PHP provides inbuilt function decoct().We have to use this function that we can convert decimal to octal string.Many developers and programmers are using this tools in daily life.
There are two ways to convert a decimal string to an octal string using built-in functions:
Use intval to convert the decimal string to numeric binary, and then use decoct to convert the numeric binary value to an octal string:
$decString = "15";Use base_convert to convert the decimal string directly to an octal string:
$decString = "25";