/**
* decimal-to-binary, octal, hex-less digits 0 *
*
* @param array $datalist incoming data array (100,123,130)
* The binary @param int $bin conversion can be: 2,8,16
* @return Array return data array () returns no data conversion format
*
Decimal System Conversion function description, Decimalsystem
One, decimal system conversion function description1, decimal to Binary decbin () function, the following exampleEcho Decbin (12); Output 1100Echo Decbin (26); Output 11010Decbin(PHP 3,
Php color conversion function hex-rgb (convert the hexadecimal format to the decimal format ). Copy the code as follows :? Phpfunctionhex2rgb ($ color) {if ($ color [0] #) {$ coloursubstr ($ color, 1);} if (strlen ($ color) 6) {list ($ r, $ g, $ B)
Hex function
Returns a String that represents a hexadecimal numeric value.
Hex(number)
The number argument is any valid expression.
Description
If The number argument is not an integer, it is rounded to the nearest integer before the operation is
PHP function description: description of the decimal, binary, octal, and hexadecimal conversion functions. 1. description of the decimalsystem conversion function 1: The decimal to binary decbin () function. for example, echodecbin (12); 1100
One, decimal system conversion function description1, decimal to Binary decbin () function, the following example
Echo Decbin (12); Output 1100
Echo Decbin (26); Output 11010
Decbin
(PHP 3, PHP 4, PHP 5)
Decbin--decimal conversion into
Hex Function
Returns a string that represents the hexadecimal numeric value.
Hex(number)
NumberThe parameter is any valid expression.Description
IfNumberIf the parameter is not an integer, It is rounded to the nearest integer before calculation.
This article introduces in detail the application of decimal, binary, octal and 16 binary conversion functions in PHP, and the friends who need it can refer to the following.
One, decimal system conversion function description1, decimal to Binary
Phpbcd code compression-compress decimal numbers into hexadecimal data. Next, let's take a look at the example about how to compress the phpbcd code to compress the decimal number into the hexadecimal data. I hope this article will help you. For
Below we together to see and an article about PHP BCD code compression-The decimal number compressed into hexadecimal data instances, I hope that the article to help you students oh.
Example, PHP BCD compression-Compress decimal numbers into
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.