1. Computing & Technology

Discuss in my forum

Decoct () PHP Function

By , About.com Guide

Definition: The Decoct () PHP Function is used to convert a decimal number into an octal number. If you want to change it back again you can use the Base_convert () PHP function or the Octdec () Function. The highest number that can be converted is 4294967295 in decimal which becomes 37777777777 in octal.
Also Known As: Octal Number
Examples:
 <?php 
 echo(decoct(1) . "<br />"); 
 echo(decoct(100) . "<br />"); 
 echo(decoct(3500) . "<br />"); 
 echo(decoct(23594) . "<br />"); 
 ?> 
This will return:
1
144
6654
56052

©2012 About.com. All rights reserved.

A part of The New York Times Company.