- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
octdec() function in PHP
The octdec() function converts octal to decimal.
Syntax
octdec(val)
Parameters
val − the octal string to convert
Return
The octdec() function Returns the decimal equivalent of the specified octal number.
Example
<?php echo octdec("-120"); ?>
Output
a80
Example
Let us see another example −
<?php echo octdec("170"); echo octdec(decoct(170)); ?>
Output
120170
Advertisements