You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When use CJK char as variable name in PHP, it would error. I found the reson is it use regular expression /^$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ to match variable , but JS string is unicode so the match would fail.
I suggest to use /^$[a-zA-Z_\u4E00-\u9FA5][a-zA-Z0-9_\u4E00-\u9FA5]*/ .
The text was updated successfully, but these errors were encountered:
When use CJK char as variable name in PHP, it would error. I found the reson is it use regular expression /^$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/ to match variable , but JS string is unicode so the match would fail.
I suggest to use /^$[a-zA-Z_\u4E00-\u9FA5][a-zA-Z0-9_\u4E00-\u9FA5]*/ .
The text was updated successfully, but these errors were encountered: