decoct() function in PHP


The decoct() function converts a decimal number to an octal. It Returns an octal string of the specified decimal.

Syntax

decoct(num)

Parameters

  • num − The decimal value to convert.

Return

The decoct() function Returns an octal string of the specified decimal.

Example

 Live Demo

<?php
   echo decoct("70");
?>

Output

106

Let us see another example −

Example

 Live Demo

<?php
   echo decoct("7878787888");
?>

Output

72547141460

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 26-Jun-2020

31 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements