No. You could perhaps wipe out *EVERYTHING* in $_GLOBALS, which would be the included file and anything in the main file[s] that went before. If you need an environment that is that "pure" for testing or something, you can run a different PHP process on each file. Otherwise, you simply have to architect your application correctly. Some other solutions to this naming/scope problem include 'packages' which php doesn't have and 'namespaces' which php doesn't have and... There have been innumerable flame wars here and on Internals about the right way to add a new feature to do this, and I don't think there is any real concensus yet. On Thu, March 8, 2007 1:18 am, jekillen wrote: > Hello; > Is there a way to un include a file once it has been included in a > script. > My concern is where two php files might be included in another php > file they might have code or variables that conflict. I am thinking > of including files with different names but follow the same pattern > of code and variables but may have different values for variables > or different versions of the same function. > If there is not a specific function for un including a file (I have > not > seen any indication from my text books that there is), it seems like > it would be nice to have one. > Meanwhile I will be doing some experimentation. > Thanks in advance; > Jeff K > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php