Javatpoint Logo
Javatpoint Logo

PHP decoct() function

Php decoct() is important predefine mathematical function. It is used to convert decimal number to octal number.

Syntax:

Parameter Description Required/Optional
number Specify the decimal value Required

Example 1

Output:

Your Decimal number is : 15
By using 'decoct()'function, your Octal number is :17

Example 2

Output:

Your Decimal number is : 264
By using 'decoct()'function, your Octal number is :410

Example 3

Output:

Your Decimal number is : 30
By using 'decoct()'function, your Octal number is :36

Example 4

Output:

Your Decimal number is : 70
By using 'decoct()'function, your Octal number is :106

Example 5

Output:

Your Decimal number is : 9999
By using 'decoct()'function, your Octal number is :23417

Next TopicPHP Math





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA