ID: 25658
Comment by: matbtt at web dot de
Reported By: gms08701 at yahoo dot com
Status: Open
Bug Type: Documentation problem
Operating System: FreeBSD 4.8-RELEASE-p3
PHP Version: 4.3.3
New Comment:
> It's correct behaviour, manual is wrong.
I faced the problem after my provider updated to 4.3.4 and I can't
believe that this should be the correct behaviour. The function's name
is get_included_files and this is what it should return and has
returned in 4.2.2 for example.
Previous Comments:
------------------------------------------------------------------------
[2003-09-25 13:23:33] [EMAIL PROTECTED]
It's correct behaviour, manual is wrong.
------------------------------------------------------------------------
[2003-09-25 12:32:16] gms08701 at yahoo dot com
Description:
------------
Using get_included_files() function returns an array of
included/required files *plus* the file being accessed via the url.
When reading the manual ->
Returns an array of the names of all files that have been included
using include(), include_once(), require() or require_once()
So going strictly by that, this extra file shouldn't be in the result
array.
I came across similar reports in the bugs database, but they all
suggest that the problem was fixed.
Thanks for your time
Reproduce code:
---------------
a.php
----
<?php
?>
b.php
----
<?php
include('./a.php');
var_dump(get_included_files());
?>
Expected result:
----------------
When viewing b.php, I should be getting ->
array(1) { [0]=> string(27) "/files/www/data/crash/a.php" }
Actual result:
--------------
When viewing b.php, Im getting ->
array(2) { [0]=> string(27) "/files/www/data/crash/b.php" [1]=>
string(27) "/files/www/data/crash/a.php" }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25658&edit=1