简体   繁体   English

什么是PHP中的x7f?

[英]What is x7f in php?

What is x7f and xff in php? 什么是PHP中的x7fxff

Is it hexa or octal values? 是六角形还是八角形值?

EDIT: 编辑:

It is given in PHP 5.3 manual that, as a regular expression, class name would be expressed as: [a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]* . 在PHP 5.3手册中给出,作为正则表达式,类名称将表示为: [a-zA-Z_ \\ x7f- \\ xff] [a-zA-Z0-9_ \\ x7f- \\ xff] *

can any one help what is the meaning of \\x7f-\\xff in above regular expression? 任何人都可以帮助上面正则表达式中\\ x7f- \\ xff的含义是什么?

As per the integer page on PHP.net , the format of hex in PHP is: 根据PHP.net上整数页面 ,PHP中的十六进制格式为:

hexadecimal : 0[xX][0-9a-fA-F]+

thus it's hex. 因此它是十六进制的。

As other stated its x7f & xff are hexadecimal code which corresponds to extended ASCII characters that can be added as part of class name in php. 正如其他声明的那样,它的x7fxff是十六进制代码,对应于扩展的ASCII字符,可以作为php中类名的一部分添加。 ASCII Codes ASCII码

0x前缀(不仅仅是x )表示十六进制,因此0x7f为127,0xff为255。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM