How to use decoct in PHP

This article describe about decoct() Function in PHP.
  • 1347

decoct() Function

For convert decimal number to octal number use decoct() function.

Syntax

decoct(dec_number)

 

Parameter Description
dec_number Define the decimal number to convert

Example

<html>
<body>
<?php
echo decoct("50") . "<br />";
echo decoct("20") . "<br />";
echo decoct("399") . "<br />";
echo decoct("55");
?>
</body>
</html>

 

Output


decoctphp.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.