PHP 4.0 Bug #9641: get_required_files()/get_included_files() does not work as docuemented
| From: | yohgaki at dd dot iij4u dot or dot jp | Date: | Thu, 08 Mar 2001 23:26:49 +0000 |
| Subject: | PHP 4.0 Bug #9641: get_required_files()/get_included_files() does not work as docuemented | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-48324@lists.php.net to get a copy of this message | ||
From: yohgaki@dd.iij4u.or.jp
Operating system: RedHat7
PHP version: 4.0.4pl1
PHP Bug Type: Scripting Engine problem
Bug description: get_required_files()/get_included_files() does not work as docuemented
get_required_files()/get_included_files() does not work as docuemented
http://www.php.net/manual/en/function.get-required-files.php
Tested under Apache 1.3.17 w/ mod-ssl, mod-gzip, and other modules comes with apache. RedHat
7.0.1/j. PHP 4.0.4pl1 running as apache module.
I found strange require_once() behaviour (to be reported as bug) and I also found this problem.
If this is not a script engine problem, then it should be documentation problem. Hope this info
helps developer/documentation team.
Following code is identical to the example in manual.
<?php
require_once ('local.php');
require_once ('../inc/global.php');
for ($i=1; $i<5; $i++) {
include_once 'util'.$i.'php';
}
echo '<pre>';
echo "Required_once files\n";
print_r (get_required_files());
echo "Included_once files\n";
print_r (get_included_files());
echo date('H:i:s',time());
echo '</pre>';
?>
I get
===========================================
Required_once files
Array
(
[0] => /home/httpd/httpd/html/untitled/local.php
[1] => /home/httpd/httpd/html/inc/global.php
[2] => /home/httpd/httpd/html/untitled/util1php
[3] => /home/httpd/httpd/html/untitled/util2php
[4] => /home/httpd/httpd/html/untitled/util3php
[5] => /home/httpd/httpd/html/untitled/util4php
)
Included_once files
Array
(
[0] => /home/httpd/httpd/html/untitled/local.php
[1] => /home/httpd/httpd/html/inc/global.php
[2] => /home/httpd/httpd/html/untitled/util1php
[3] => /home/httpd/httpd/html/untitled/util2php
[4] => /home/httpd/httpd/html/untitled/util3php
[5] => /home/httpd/httpd/html/untitled/util4php
)
08:17:35
=======================================
--
Edit Bug report at: http://bugs.php.net/?id=9641&edit=1