Online Octal To Decimal Convert Tool




About Octal to Decimal (A free online tool to converts Octal to Decimal)

Octal to Decimal tool convert octal string to decimal string. Many times we wants to convert octal to decimal that time we can use PHP provides inbuilt function octdec().We have to use this function that we can convert octal to decimal string.Many developers and programmers are using this tools in daily life.

Syntax:
base_convert($octString,8,10);

For Example:

There are two ways to convert a octal string to decimal string using built-in functions:

First Way:

Use intval to convert the octal string to numeric binary, and then use strval to convert the numeric binary value to a decimal string:

$octString = "15";
$binNumeric = intval($octString ,8);
$decString = strval($binNumeric); // = "13"

Second Way:

Use base_convert to convert the octal string directly to a decimal string:

$octString = "15";
$decString = base_convert($octString,8,10); // = "13"