Lazy loading? Better avoiding it?
- by Charlie Pigarelli
I just read about this design pattern: Lazy Load. And, since in the application i'm working on i have all the classes in one folder, i was wondering if this pattern could just make me avoiding the include() function for every class. I mean: It's nice to know that if i forgot to include a class, PHP, before falling into an error, trough an __autoload() function try to get it.
But is it fine enough to just don't care about including classes and let PHP do it by your own every time? Or we should write __autoload() just in case it is needed?