How to convert php Decimal to Octal
This article introduces the relevant knowledge of "how to convert php decimal to octal". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
In PHP, the decimal-to-octal algorithm is the decoct () function, which converts a specified decimal number to an octal number, returning a string of octal numbers with the syntax "decoct (number);".
This article operating environment: Windows10 system, PHP7.1 version, Dell G3 computer.
What is the algorithm of converting php decimal to octal
The decoct () function converts decimal numbers to octal numbers.
To convert octal to decimal, you can use the octdec () function.
Grammar
Decoct (number)
Number is required. Specifies the decimal value to be converted.
Return value: a string containing the octal number of the decimal value.
Examples are as follows:
Output result:
This is the end of the introduction of "how to convert php decimal to octal". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!