[thelist] PHP include parsing behaviour

Andrew Forsberg andrew at thepander.co.nz
Tue May 8 16:50:31 CDT 2001


Hi All

Does anyone know whether PHP parses all the routines in an entire 
included file every time it loads it? Or does it just parse the 
signature of all the functions in the routine, then parse the routine 
when it's called?

That is, say I have (and I do), in one of my utility include files 
something like this:

function whatever_blah_blah($blah, $foo, $bar)
{
	.....
}

function another_function($evolt, $members, $use, $frontpage)
{
	.......
}

function etc_etc($whatever)
{
	.....
}

and so on.

If some pages only use some of the utility functions in this include 
file, or even just one or two (and there are over twenty functions in 
the include I'm concerned about), am I putting unnecessary load on 
the server?

I'd like to avoid breaking up the functions because they're all 
related, and the less file access the better, right?

Sorry if this is a dim question.

Andrew
-- 
Andrew Forsberg
http://www.thepander.co.nz/




More information about the thelist mailing list