What are the rules and guidelines for variable naming in PHP?

When naming variables in PHP, it is important to follow certain rules and guidelines to ensure clarity and consistency in your code. Variable names should start with a dollar sign ($) followed by a letter or underscore, and can then be followed by letters, numbers, or underscores. Variable names should be descriptive and meaningful, avoiding abbreviations or overly cryptic names. Additionally, variable names are case-sensitive in PHP, so be consistent in your naming conventions.

// Example of correct variable naming in PHP
$firstName = "John";
$lastName = "Doe";
$age = 30;