Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP octdec() Function

PHP octdec() Function

PHP Math Reference Manual PHP Math Reference Manual

Example

Convert octal to decimal:

"; echo octdec("12") . "
"; echo octdec("3063") . "
"; echo octdec("106"); ?>

Run Example »


Definition and Usage

The octdec() function converts an octal number to a decimal number.

**Tip:** To convert a decimal number to an octal number, see decoct() function in Vue 3.


Syntax

octdec(

octal_string

);

Parameters Description
octal_string Required. Specifies the octal string to convert.

Technical Details

Return Value: octal_string The decimal value of.
Return Type: Float / Integer
PHP Version: 4+

PHP Math Reference Manual PHP Math Reference Manual