ID: 46821 Updated by: scott...@php.net Reported By: php at pk dot freesurf dot fr Status: Bogus Bug Type: Performance problem Operating System: linux PHP Version: 5.2.8 New Comment:
APC provides this functionality and there is no intention to add this at the moment. Previous Comments: ------------------------------------------------------------------------ [2008-12-15 19:19:08] php at pk dot freesurf dot fr of course it is not a bug, but it is a performance problem, that can be solved easyly... ------------------------------------------------------------------------ [2008-12-10 15:19:23] j...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ------------------------------------------------------------------------ [2008-12-10 12:46:21] php at pk dot freesurf dot fr Description: ------------ include "foo.php" within a loop is re-accessed & re-compile before execution each time... php already knows that the file has been included (include_once generates an error), but does not remember the code within... for source code clarity, has there is no macro-processor like in C, it is very usefull to use the include statement... a function call is not appropriate in every case, as local variable scope can be a problem... if there are 20 or more variable to be accessed, code will be not clear if they are part of function arguments, neither the code will be clear if all variables are declared global. so it is really an issue for me... Reproduce code: --------------- <? for ($i=0;$i<10000;++$i) { include "foo.php"; } ?> foo.php : hundreds of code lines when content of foo.php is pasted inside the loop, execution time dramasticaly shorter.. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46821&edit=1