PHP octdec() Function
Definition and Usage
The octdec() function converts octal to decimal.
Syntax
octdec(octal_string)
Parameter | Description |
---|---|
octal_string | Required. Specifies the octal number to be converted. |
Description
Returns octal_string The decimal equivalent of the octal number represented by the parameter. The largest number that can be converted is 17777777777 or 2147483647 in decimal. Starting from PHP 4.1.0, this function can handle large numbers, in which case it will return a float type.
Example
<?php echo octdec("36"); echo octdec("12"); echo octdec("3063"); echo octdec("106"); ?>
Output like:
30 10 1587 70