Runtime weight of PHP class istantation

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-17-2006
amadei@gmail.com
 
Posts: n/a
Default Runtime weight of PHP class istantation

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.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:36 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0