halfer / php-tutorial-text

The chapter text for the "I ♥ PHP" project
14 stars 1 forks source link

Are all variable names self-explanatory? #8

Open halfer opened 10 years ago

halfer commented 10 years ago

One reader reports that $stmt is rather confusing, and I am inclined to agree. This variable name is a bit of a standard for PDOStatement objects, but $statement or even $result would be better.

It might be worth scanning the whole codebase for any variables that have been unnecessarily abbreviated.