Advanced PHP tutorial 9: Autoload your classes PSR 0
In PHP the most common way to load a class from a different file is to requireonce or includeonce. The problem with this approach is that you need to manually add each file. What if a file is not used You still added it, which takes up time and memory. What if the order of your includes change More manual work for The solution is to use composer and its handy autoloader feature. You can autoload classes and namespaces using the PSR0 or PSR4 standards, and structure your modules in a way simila
|
|