Poonam Bhatt Poonam Bhatt - 9 months ago 70
PHP Question

What is x7f in php?

What is x7f and xff in php?

Is it hexa or octal values?


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]*.

can any one help what is the meaning of \x7f-\xff in above regular expression?

Answer Source

As per the integer page on PHP.net, the format of hex in PHP is:

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

thus it's hex.