Yes it is! The variable creates a storage area so you can use and manipulate them. if not in use, in this case memory consumption will occur. sendEmail($user["email"]); would be a better way. but this is not a good way to write codes without variables. Through a variable, you can track actual errors, if any, and also helps in scalability, readability.
source share