What is Autoloader in PHP?

Technology CommunityCategory: LaravelWhat is Autoloader in PHP?
VietMX Staff asked 12 months ago

Autoloaders define ways to automatically include PHP classes in your code without having to use statements like require and include.

  • PSR-4 would allow for simpler folder structures, but would prevent us from knowing the exact path of a class just by looking at the fully qualified name.
  • PSR-0 on the other hand is chaotic on the hard drive, but supports developers who are stuck in the past (the underscore-in-class-name users) and helps us discern the location of a class just by looking at its name.