xref: /PHP-7.2/Zend/tests/014.phpt (revision 17ccbeec)
1--TEST--
2get_included_files() tests
3--FILE--
4<?php
5
6var_dump(get_included_files());
7
8include(dirname(__FILE__)."/014.inc");
9var_dump(get_included_files());
10
11var_dump(get_included_files(1,1));
12
13include_once(dirname(__FILE__)."/014.inc");
14var_dump(get_included_files());
15
16var_dump(get_included_files(1));
17
18include(dirname(__FILE__)."/014.inc");
19var_dump(get_included_files());
20
21echo "Done\n";
22?>
23--EXPECTF--
24array(1) {
25  [0]=>
26  string(%d) "%s"
27}
28array(2) {
29  [0]=>
30  string(%d) "%s"
31  [1]=>
32  string(%d) "%s"
33}
34
35Warning: get_included_files() expects exactly 0 parameters, 2 given in %s on line %d
36NULL
37array(2) {
38  [0]=>
39  string(%d) "%s"
40  [1]=>
41  string(%d) "%s"
42}
43
44Warning: get_included_files() expects exactly 0 parameters, 1 given in %s on line %d
45NULL
46array(2) {
47  [0]=>
48  string(%d) "%s"
49  [1]=>
50  string(%d) "%s"
51}
52Done
53