1--TEST--
2Test get_include_files() function
3--INI--
4include_path=.
5--FILE--
6<?php
7
8
9echo "*** Testing get_included_files()\n";
10
11echo "\n-- List included files at start --\n";
12var_dump(get_included_files());
13
14include(__DIR__."/get_included_files_inc1.inc");
15echo "\n-- List included files atfter including inc1 -\n";
16var_dump(get_included_files());
17
18include(__DIR__."/get_included_files_inc2.inc");
19echo "\n-- List included files atfter including inc2 which will include inc3 which includes inc1 --\n";
20var_dump(get_included_files());
21
22?>
23--EXPECTF--
24*** Testing get_included_files()
25
26-- List included files at start --
27array(1) {
28  [0]=>
29  string(%d) "%sget_included_files.php"
30}
31
32-- List included files atfter including inc1 -
33array(2) {
34  [0]=>
35  string(%d) "%sget_included_files.php"
36  [1]=>
37  string(%d) "%sget_included_files_inc1.inc"
38}
39
40-- List included files atfter including inc2 which will include inc3 which includes inc1 --
41array(4) {
42  [0]=>
43  string(%d) "%sget_included_files.php"
44  [1]=>
45  string(%d) "%sget_included_files_inc1.inc"
46  [2]=>
47  string(%d) "%sget_included_files_inc2.inc"
48  [3]=>
49  string(%d) "%sget_included_files_inc3.inc"
50}
51