|
|
PHP octdec() - Math Functions
|
Tutorials » Php »
|
Topic |
What is octdec Function?
How to convert octal number to decimal in PHP?
|
|
Explanation |
|
The "octdec()" function converts a octal number to decimal number.
Syntax:
octdec(oct_number)
In the above syntax, "oct_number" is the octal number to be converted to decimal number.
Example:
<?php
echo octdec(12) . "\n";
echo octdec(17);
?>
Result:
10
15
In the above example, the octal numbers "12", "17" are converted to decimal numbers "10", "15".
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|