What are the best practices for defining and using variables in PHP scripts?

When defining and using variables in PHP scripts, it is important to follow best practices to ensure code readability, maintainability, and efficiency. Some best practices include using descriptive variable names, initializing variables before use, avoiding global variables, and using proper data types.

// Example of defining and using variables in PHP script
$firstName = "John";
$lastName = "Doe";
$age = 30;

// Output the variables
echo "Name: " . $firstName . " " . $lastName . "<br>";
echo "Age: " . $age;