X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

PHP octdec() Function

PHP Math Reference PHP Math Reference

Example

Convert octal to decimal:

<?php
echo octdec("36") . "<br>";
echo octdec("12") . "<br>";
echo octdec("3063") . "<br>";
echo octdec("106");
?>

Run example »

Definition and Usage

The octdec() function converts an octal number to a decimal number.

Tip: To convert decimal to octal, look at the decoct() function.


Syntax

octdec(octal_string);

Parameter Description
octal_string Required. Specifies the octal string to convert

Technical Details

Return Value: The decimal value of octal_string
Return Type: Float / Integer
PHP Version: 4+


PHP Math Reference PHP Math Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook