Re: Advice on script length please!

From: Date: Thu, 05 Jun 2003 12:42:18 +0000
Subject: Re: Advice on script length please!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-150342@lists.php.net to get a copy of this message
On a similar note, does php 'look at' all the functions even if not used? I can understand it reads them, but does it involve any parsing time? Bix. "Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message news:C8F323573C030A448F3E5A2B6FE2070B0101F78D@nemesis... [snip] > If I did this, would it make a huge amount of difference? I'm almost certain it WOULD make a difference, but apart from the execution time, I can't think of anything worse than scrolling through 2000 lines of code looking for the section I'm after. Or, even if *I* could find my way around, what about other developers who have to decipher it later??? [/snip] Even if the functions are in an include and I called that include at the top of the page wouldn't that just make the overall code the same length? i.e. <?pseudo-code include("functions.php"); switch($action) case "do this": ..... function(s) called break; case "do that": ..... other function(s) called break; case "do the other": ..... no function(s) called break; ?> Now, it does make the code neater and easier to document no doubt, but doesn't the script namespace above become the same length as itself plus the included file(s)? Jay

« previous php.general (#150342) next »