Hi,
in php3 we could prevent multiple re-definitions of functions in include files that might be included more than once by using constants:
$flag = 'INCLUDE_' . basename(FILE);
if(defined($flag)) { return; }
define($flag,TRUE);
works perfectly in PHP3. In 4, the test of defined()
seems to fail, and we get multiple re-defs of our functions in the included file.
Anyone have any ideas?
kind regards.