| 
	
 | 
 Posted by NC on 07/20/07 00:27 
On Jul 19, 4:14 pm, Martin Larsen <martin+spamfree+lar...@bigfoot.com> 
wrote: 
> 
> When a PHP program links to a library using include 
> or require (or their _once variations), is the library 
> then linked dynamically or statically? 
 
Neither.  include/require is not a linking mechanism; it is a way to 
assemble a complete block of source code prior to its interpretation. 
Any static linking takes place at the server process start-up (i.e., 
before any include/require can happen); dynamic linking (if any) 
occurs during execution (i.e., after the source code has been 
interpreted, and, therefore, after any include/require). 
 
> it is quite important to know what kind of linking is in 
> effect when including libraries, 
 
Only if the libraries are true libraries (i.e., those compiled into 
native executable code).  With PHP "libraries", using include/require 
does not imply any linking... 
 
Cheers, 
NC
 
[Back to original message] 
 |