In the PHP manual, you see that the matching variable names are:
$pattern = '/[a-za-z_\x7f-\xff][a-za-z0-9_\x7f-\xff]*/';
The naming conventions for variable names are:
Must begin with a letter followed by any character in a number, letter, or underscore.
But the top of the regular, \x7f-\xff in the ASCII code table can not find Ah, the 129 yards corresponding to what is it?
Reply to discussion (solution)
The letters are a-z,a-z, as well as ASCII characters from 127 to 255 (0X7F-0XFF).
The internal code value between 0x80 ~ 0xFF is the extended ASCII code, because it is occupied by Chinese characters, usually do not see
But you can see a part of it.
foreach (Get_html_translation_table (html_entities) as $k = = $v) { echo ord ($k). ' = '. $v. '
';}
The internal code value between 0x80 ~ 0xFF is the extended ASCII code, because it is occupied by Chinese characters, usually do not see
But you can see a part of it.
foreach (Get_html_translation_table (html_entities) as $k = = $v) { echo ord ($k). ' = '. $v. '
';}
Yes, well, figuring out what these codes are. After that, the name of the variable is not a description of only numbers, letters and underscores, I just tried to declare a variable
$a ⊥= ' 123 '; echo $a ⊥. '
';
There is output. Is this a little contradictory to the stated limitations?
The letters are a-z,a-z, as well as ASCII characters from 127 to 255 (0X7F-0XFF).
Oh, this is clear, at first there was a little bit of a misunderstanding.
Thank you very much for two seniors!
$ variable = ' abc ';
echo $ variable;
Aren't Chinese characters also letters?
$ variable = ' abc ';
echo $ variable;
Aren't Chinese characters also letters?
I understand! Knowledge is not comprehensive enough, thanks for mentioning!