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
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/php/function-reference/octdec.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics