Php – Most efficient way to load classes in PHP

loadingobjectPHPrequire

I'm a c# developer, so I'm used to simply compiling a library and including it within a project for use. I haven't really figured out the best way to load different objects within a PHP application. I don't want to keep using require. What is a good approach to take?

Best Answer

If you're using PHP 5.x, you probably want autoloading.