PHP base_convert() FunctionPHP base_convert() function is mathematical function. It is used to convert a number from one number base to another. Syntax:
Example 1Convert a hexadecimal number to octal number: Output: Your number is : a37334 By using 'base_convert()' function your Octal number is :101000110111001100110100 Example 2Convert a hexadecimal number to octal number: Output: Your number is : E196 By using 'base_convert()' function your Octal number is :160626 Example 3Convert an octal number to a decimal number: Output: Your Octal number is : 0031 By using 'base_convert()' function your Decimal number is :25 Example 4Convert an octal number to a hexadecimal number. Output: Your Octal number is : 364 By using 'base_convert()' function your Hexadecimal number is :f4 Example 5Converting binary to hexadecimal: Output: Your binary number is : 110011 By using 'base_convert()' function your hexadecimal number is :33
Next TopicPHP Math
|