What should I name my PHP class file?
class, naming-conventions, php
Solution
There is no difference beyond what you see. The ones with `.class` are helpful if you use autoloading and don't have a specific directory where your class files live. Otherwise, it's entirely arbitrary. (I used to use `ClassName.class.php`.)
Problem
I have seen many different naming schemes and extensions used for PHP files that are basically just classes. Some examples: - myClass.php - myClass.class.php - myClass.class What is the difference, and which is better?