I've seen a lot of open source projects that are class names. php in this form, but also seen in many frameworks inside is the class name. class.php, what's the best place to put this class?
I personally prefer. The form of class.php, because such a third-party class library is imported in some frameworks specifies that the class library suffix can be specified directly as. class.php
Reply content:
I've seen a lot of open source projects that are class names. php in this form, but also seen in many frameworks inside is the class name. class.php, what's the best place to put this class?
I personally prefer. The form of class.php, because such a third-party class library is imported in some frameworks specifies that the class library suffix can be specified directly as. class.php
*.config.php
*.function.php
*.class.php
The above is suitable for small code use, everything is left in a directory.
If not, you do not need a file name like this.
Recommended to understand the next PHP psr-4: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md
This is the use of the habit of the question, or according PSR-4
to write better, after all, there is composer
automatically help you to generate a namespace and the source file mapping relationship, easy to use
I personally think that if it is a PHP file
Well, that would be the end of PHP.
There's no need to distinguish between class file profile function files
If you want to see it, it's best to look at the http://packagist.org/item.
It should all end in PHP!