Skip to content

Automatic PHP Class Loader is the preferred method of doing Automatic Including of class files when they are referenced in a PHP runtime environment.

Notifications You must be signed in to change notification settings

amrameen769/php-autoclassloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

php-autoclassloader

This is an Automatic ClassFile Loader for PHP.

How To

  1. Include "init.php" file in the project at the start.
  2. Put all your class files organized under "lib" directory in the server root.
  3. There you go!

Whenever a class is referenced throughout the PHP runtime environment, if the classFile is not yet included into the runtime, the system automatically calls the "spl-autoload-register" for the classFile. And this call is directed to the "lib" directory in the server root, and all the class files under the subdirectories are included into the project.

This is the preferred method for autoloading classes in PHP 7.2 onwards

About

Automatic PHP Class Loader is the preferred method of doing Automatic Including of class files when they are referenced in a PHP runtime environment.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages