PHP octdec () function
Examples
The octal to decimal:
<?php
echo octdec("36") . "<br>";
echo octdec("12") . "<br>";
echo octdec("3063") . "<br>";
echo octdec("106");
?>
echo octdec("36") . "<br>";
echo octdec("12") . "<br>";
echo octdec("3063") . "<br>";
echo octdec("106");
?>
Running instance »
Definition and Usage
octdec () function to convert an octal number to decimal.
Tip: To convert the decimal number to octal, check decoct () function.
grammar
octdec( octal_string );
参数 | 描述 |
---|---|
octal_string | 必需。规定要转换的八进制字符串。 |
technical details
return value: | octal_string the decimal value. |
---|---|
Return type: | Float / Integer |
PHP version: | 4+ |
PHP Math Reference