What is the meaning of \x00 , \x04 in PHP

前端 未结 5 764
甜味超标
甜味超标 2021-01-31 07:39

i have some codes having the \\x00 and \\x04 hex codes, what does it means?

$str= implode(\"\\x00\",          


        
5条回答
  •  孤独总比滥情好
    2021-01-31 08:32

    \x is a way to indicate that the next two characters represent hexadecimal digits. Two hexadecimal digits (each of them 4 bits) make a byte.

    If you want to know what the decimal version is, multiply the left numeral by 16 and add it to the right numeral, keeping in mind that "a" is 10, "b" is 11, etc.

    In other programming languages, a dollar sign or the sequence 0x can also be used to flag hexadecimal numbers.


    The numbers can represent anything. Sometimes they are control codes. Check an ASCII table.

提交回复
热议问题