Home > Article > Backend Development > Detailed introduction to the article about string function bin2hex()
Illustration of ASCII code comparison table, taking character A as an example Dec represents decimal, such as 65 Hx represents hexadecimal, such as 41 Oct represents octal, such as 101 Char represents display characters, such as A The ASCII code comparison table is divided into two units 1. Control characters 0-31 and 1272, display characters 32-126 (1) 48 to 57 are ten Arabic numerals from 0 to 9; (2) 65 to 90 are 26 uppercase English letters; (3) Numbers 97 to 122 are 26 lowercase English letters; (4) Other punctuation marks, arithmetic symbols, etc.; 3. Description of PHP character conversion function For specific descriptions of character conversion functions, please refer to [PHP functions detailed explanation of decimal, binary, octal and hexadecimal conversion functions] Decimal to binary conversion decbin() function Decimal to octal decoct() function Decimal to hexadecimal dechex() function Bin2hex() function to convert binary to hexadecimal Binary to decimal conversion bindec() function Octal to decimal octdec() function Hexadecimal to decimal hexd
1. Conversion of characters php
Introduction:: This article mainly introduces character conversion in PHP. Students who are interested in PHP tutorials can refer to it.
2. tips for php internship (common string processing functions)
Introduction::php internship tips (common string processing functions): addcslashes — add backslash escape characters to some characters in the string addslashes — Escape characters in a string in a specified way bin2hex — Convert binary data to hexadecimal representation chop — alias function for rtrim() chr — Returns the ASCII code of a character chunk_split — Split a string into small chunks according to a certain character length convert_cyr_string — Convert Cyrillic characters
3. ph PHP5 string processing function collection
Introduction: ph:ph Complete collection of PHP5 string processing functions: addcslashes - Add backslash escape characters to some characters in the string addslashes - Use the specified method to escape the characters in the string bin2hex - Convert binary data to hexadecimal representation chop — alias function chr of rtrim() — returns the ASCII code of a character chunk_split — splits the string into small pieces according to a certain character length convert_cyr_string — converts Cyrillic characters into other characters
4. PHP Getting Started 5 C++ and PHP Binary Transfer
Introduction:: PHP Getting Started 5 C++ and PHP Binary Transfer: C++ needs to implement the PHP side:bin2Hex function , PHP calls:pack through this type of string and converts it into binary data that PHP can recognize. What C++ needs to do is to implement a bin2hex. In fact, it just treats the binary data read by C++ as a byte array and converts each bit into a hexadecimal string. Using sprintf in Qt cannot limit the length to 2 digits, so after sprintf determines that the length is 8, it intercepts the last 3 strings, including the /0 terminator. QString Bin2Hex(cha
5. PHP Character Function Encyclopedia Page 1/2_PHP Tutorial
Introduction: PHP Character Functions Page 1/2. AddSlashes: Add slashes to strings. Bin2hex: Convert binary to hexadecimal. Chr: Return ordinal characters. convert
6. Escape unescape's php implementation method_PHP tutorial
Introduction: escape unescape's php The implementation method below functionescape($str){ preg_match_all("/[x80-xff].|[x01-x7f]+/",$str,$r); $ar=$r[0]; foreach($ aras$k=$v){ if(ord($v[0])128) $ar[$k]=rawurlencode($v); else $ar[$k]="%u".bin2hex(ic
7. [PHP] Practical Function 5_PHP Tutorial
##Introduction: [PHP] Practical Function 5 //Put. Convert the binary representation of a number to hexadecimal stringbin2hex(stringtring) //Remove spaces at the end of the string stringrtrim(stringstring) //An alias for rtrim stringchop(s
8 . PHP5 Complete String Processing Functions_PHP Tutorial
Introduction: A complete collection of PHP5 string processing functions. addcslashes — Add backslash escape characters to some characters in the string addslashes — Escape characters in the string in a specified way bin2hex — Convert binary data to
9 . A brief analysis of 51 PHP functions for processing strings_PHP tutorial
Introduction: A brief analysis of 51 PHP functions for processing strings. Including, calculating the string length, splitting the string, searching the string and so on. 1.AddSlashes: Add slashes to the string. 2.bin2hex: Convert binary to hexadecimal. 3.Chop: Remove
10. PHP Character Function Collection_PHP Tutorial
Introduction: PHP Character Function Collection . AddSlashes: Add slashes to the string. bin2hex: Convert binary to hexadecimal. Chop: Remove consecutive blanks. Chr: Returns the ordinal value of a character. chunk_split: Divide the string into small segments. c
[Related Q&A recommendations]:
php - A problem of bypassing SQL injection by using UNHEX
The above is the detailed content of Detailed introduction to the article about string function bin2hex(). For more information, please follow other related articles on the PHP Chinese website!