Annotation of embedaddon/php/ext/reflection/tests/ReflectionFunction_getFileName.002.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ReflectionFunction::getFileName()
3: --CREDITS--
4: Robin Fernandes <robinf@php.net>
5: Steve Seear <stevseea@php.net>
6: --FILE--
7: <?php
8:
9: /**
10: * my doc comment
11: */
12: function foo () {
13: static $c;
14: static $a = 1;
15: static $b = "hello";
16: $d = 5;
17: }
18:
19: /***
20: * not a doc comment
21: */
22: function bar () {}
23:
24:
25: function dumpFuncInfo($name) {
26: $funcInfo = new ReflectionFunction($name);
27: var_dump($funcInfo->getFileName());
28: }
29:
30: dumpFuncInfo('foo');
31: dumpFuncInfo('bar');
32: dumpFuncInfo('extract');
33:
34: ?>
35: --EXPECTF--
36: string(%d) "%sReflectionFunction_getFileName.002.php"
37: string(%d) "%sReflectionFunction_getFileName.002.php"
38: bool(false)
39:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>