PHP: octdec() function
Description
The octdec() function is used to convert an octal number to a decimal number.
Version:
(PHP 4 and above)
Syntax:
octdec(num)
Parameter:
Name | Description | Required / Optional |
Type |
---|---|---|---|
num | The octal number to convert. | Required | String |
Return value:
The decimal value of the octal string.
Value Type: Float/integer.
Pictorial Presentation
Example:
<?php
echo octdec('26').'<br>';
echo octdec('172').'<br>';
echo octdec('3154').'<br>';
?>
Output :
22 122 1644
View the example in the browser
See also
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics