note 28850 deleted from function.include by sniper

From: Date: Tue, 04 Nov 2003 00:41:01 +0000
Subject: note 28850 deleted from function.include by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59781@lists.php.net to get a copy of this message
Note Submitter: dnac@NOSPAM.linuxmail.org ---- This may be obvious but... It should be noted that only _variables_ in the included file inherit the variable scope of the location that the include is made. This means that if there is a function or class in the include file and the file is included by a function or method, the function and class are global. If a file is included into a method and that file has a global variable, then that variable will only be available to that method -- not the whole class. Again, sorry if this is obvious but it rules out some possibilities such as adding methods to classes via include files. Cheers, dnac

« previous php.notes (#59781) next »