I'm just starting to dive into PHP Classes. I was wondering what some best practices are. I would like to create all of my PHP Classes in one file (myClasses.php for example), and then include that on every page. This way, I would have access to all of my classes whenever I need them. Are there any problems with going this route? Does it eat up server memory? Is there a better way? Thanks.
It's easier to manage and maintain classes if they all have their own files. I personally include_once(); my classes when and if I need them, otherwise it's a waste of resources.
Thanks for the reply. What kind of resources are wasted? Server memory? I'm just trying to better understand how all of this stuff fits together. So in general, most people have a separate file for each class. Is that correct?