[Php 4, Php 5, Php 7, Php 8]
BIN2HEX - Chuyển đổi dữ liệu nhị phân thành biểu diễn thập lục phân — Convert binary data into hexadecimal representation
Sự mô tả
bin2hex [chuỗi $string
]: Chuỗi[string $string
]: string
Thông số
string
Một chuỗi.
Trả về giá trị
Trả về biểu diễn thập lục phân của chuỗi đã cho.
Ví dụ
Ví dụ #1 bin2hex [] Ví dụbin2hex[] example
Ví dụ trên sẽ xuất ra:
string[24] "48656c6c6f20776f726c6421" string[12] "Hello world!"
Xem thêm
- hex2bin [] - giải mã chuỗi nhị phân được mã hóa hexadecimtally
- Gói [] - Gói dữ liệu thành chuỗi nhị phân
Tehjosh tại Gamingg Dot Net ¶
15 năm trước
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
j_lozinskit tại yahoo dot co dot uk ¶ ¶
17 năm trước
A good option for creating strings with binary data for saving [for example saving an sql statement to a file] into text files or php code is to do the following:
$string
0
$string
1
Manithu tại Fahr-zur-hoelle dot org ¶ ¶
17 năm trước
$string
3
$string
4
$string
5
$string
6
Manithu tại Fahr-zur-hoelle dot org ¶ ¶
Kissifrot tại Gmail Dot Com ¶
$string
8
$string
9
string
0
14 năm trước ¶
MKR tại Binarywerks dot dk ¶
string
2
string
3
string
4
string
5
string
6
string
7
18 năm trước ¶
Kissifrot tại Gmail Dot Com ¶
string
9
0
Manithu tại Fahr-zur-hoelle dot org ¶ ¶
MKR tại Binarywerks dot dk ¶
= bin2hex['Hello world!'];var_dump[$hex];
2
var_dump[hex2bin[$hex]];
?>
= bin2hex['Hello world!'];var_dump[$hex];
3
var_dump[hex2bin[$hex]];
?>
= bin2hex['Hello world!'];var_dump[$hex];
4
var_dump[hex2bin[$hex]];
?>
= bin2hex['Hello world!'];var_dump[$hex];
5
var_dump[hex2bin[$hex]];
?>
= bin2hex['Hello world!'];var_dump[$hex];
var_dump[hex2bin[$hex]];
?>
618 năm trước ¶
MKR tại Binarywerks dot dk ¶
= bin2hex['Hello world!'];var_dump[$hex];
7
var_dump[hex2bin[$hex]];
?>
= bin2hex['Hello world!'];var_dump[$hex];
8
var_dump[hex2bin[$hex]];
?>
= bin2hex['Hello world!'];var_dump[$hex];
9
var_dump[hex2bin[$hex]];
?>
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
0
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
118 năm trước ¶
MKR tại Binarywerks dot dk ¶
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
2
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
3
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
4
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
5
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
6
18 năm trước ¶
Chaos79 ¶
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
8
This function is for converting binary data into a hexadecimal string representation. This function is not for converting strings representing binary digits into hexadecimal. If you want that functionality, you can simply do this:
9
0
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
1
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
2
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
3
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
tôi tại Juanmaria dot com ¶ ¶
13 năm trước
5
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
6
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
chặt chẽ tại hotmail dot com ¶
13 năm trước
8
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
9
This would output "f9". Just remember that there is a very big difference between binary data and a string representation of binary.
0
1
chặt chẽ tại hotmail dot com ¶
MKR tại Binarywerks dot dk ¶
3
18 năm trước ¶
Chaos79 ¶
4
5
tôi tại Juanmaria dot com ¶ ¶
MKR tại Binarywerks dot dk ¶
7
8
18 năm trước ¶
Kissifrot tại Gmail Dot Com ¶
A good option for creating strings with binary data for saving [for example saving an sql statement to a file] into text files or php code is to do the following:
0