PHP decoct() Function Example

PHP decoct() Function Example


Posted in : PHP Posted on : January 28, 2011 at 6:30 PM Comments : [ 0 ]

In PHP, The decoct() function used for conversion decimal number to an octal number.

PHP decoct() Function Example:

In PHP, The decoct() function used for conversion decimal number to an octal number.

Syntax:

decoct(decimal_number)

where decimal_number is a decimal number passed as argument in this function.

Example:

<?php
$return = decoct(1234567);
echo "The value of decoct(1234567) is : " . $return . "<br/>";

$return_value = decoct(7890);
echo "The value of decoct(7890) is : " . $return_value;
?> 

After running example the output is:

The value of decoct(1234567) is : 4553207
The value of decoct(7890) is : 17322

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics