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 and will return a float type in this case.
Example
<?php echo octdec("36"); echo octdec("12"); echo octdec("3063"); echo octdec("106"); ?>
Output similar to:
30 10 1587 70