ID: 41487
User updated by: tayloj1 at uk dot ibm dot com
Reported By: tayloj1 at uk dot ibm dot com
Status: Open
Bug Type: Documentation problem
PHP Version: Irrelevant
New Comment:
The doc text which needs clarification is in the description of
include(), after the first example box (example 16.5)
http://uk.php.net/include/
Previous Comments:
------------------------------------------------------------------------
[2007-05-24 10:42:04] tayloj1 at uk dot ibm dot com
Description:
------------
Occurrences of __FUNCTION__ inside an include inside a function
declaration do not behave as documented.
The statement:
"If the include occurs inside a function within the calling file,
then all of the code contained in the called file will behave as though
it had been defined inside that function."
is not accurate if the "the code contained in the called file" involves
occurrences of __FUNCTION__ .
Additional text should be added :
"An exception to this is the _FUNCTION_ magic constant, which is
evaluated before the include occurs."
For more details see http://bugs.php.net/bug.php?id=36370, where this
was raised as a functional issue but was closed as bogus.
As the raiser states, at least the documentation should be fixed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41487&edit=1