In PHP, variables start with a
$ then a name following a specific pattern similar to all other PHP labels :
- first character : a letter, from
zin lower case or upper case, plus all ASCII characters from codes 127 (
0x7f) to 255 (
0xff), or an underscore (
- then : a group of letters (defined as above), underscores, or numbers.
We can use the following regular expression to represent them :