Bug #3403: duplicate loading of include files

From: Date: Fri, 04 Feb 2000 14:42:53 +0000
Subject: Bug #3403: duplicate loading of include files
Groups: php.dev 
Request: Send a blank email to php-dev+get-15192@lists.php.net to get a copy of this message
From: terado@hotmail.com Operating system: All PHP version: 3.0.14 PHP Bug Type: Other Bug description: duplicate loading of include files This probably is not strictly a bug but is certainly something that does not follow normal programming methods and so is important. When you include or require a file there is no logical way to prevent duplicate loading. So for example if there are three files as: //File 1 - file1.php3 include "imp.inc"; testimp(); include "file2.inc"; //File 2 - file2.inc include "imp.inc"; testimp(); //File 3 - imp.inc function testimp(){ print "hello\n"; } This will not work, also using require. I would either expect that I could put something like #ifndef to prevent reinclusion or I would expect this to infact be the difference that require would play. It is also a real pain to get around this problem. Hope this is clear, and relevant. Thanks, Nick

« previous php.dev (#15192) next »