Skip to main content
The 2024 Developer Survey results are live! See the results
Source Link
John Conde
  • 218.9k
  • 99
  • 461
  • 501

Unexpected '='

This can be caused by having invalid characters in a variable name. Variables names must follow these rules:

Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores. As a regular expression, it would be expressed thus: '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'

Post Made Community Wiki by John Conde