creating instances of classes

hello all,

i am making a website with a lot of classes in it and instead of having to create an instance of each class before i am about to use it, can i just create a class that will automatically create instances of every other class on construct? i would like to know if this is bad (ie slow down the website, taking up too much memory, somehow cause problems, etc), or if you think that would be ok?

thanks,
chad.

It's hard to tell whether or

It's hard to tell whether or not it would slow down your application. The best thing to do would be to profile your application and see if it does actually slow it down.

I've been trying to profile my applications using XDebug and Webgrind, but there plenty of other ways to profile your application.

More information on profiling with XDebug can be found at http://xdebug.org/docs/profiler