This is a discussion on Runtime weight of PHP class istantation within the PHP General forums, part of the PHP Programming Forums category; I have a question about istantation of classes in PHP. I have two different situation: 1. I have one file ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have a question about istantation of classes in PHP.
I have two different situation: 1. I have one file for a class with about 30 method inside like: class foo { function 1 ... function 2 ... function 30... } 2. I have 5 different class with 5 method each like: class free { function 1... function 5 ... } class free_ { function 1 ... function 5 ... } The question is: Which is the most weight operation? Istantatia the first big class and then launch its method or istantiate the 5 classes and lanuch the specific method? In this analysys you have to consider that if I instantiate a "small class", avery method will be launched. The number of method launched is the same for each situation. Thanks a lot for any help. |