xref: /PHP-5.4/Zend/tests/bug55156.phpt (revision 09842e83)
1--TEST--
2Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
3--FILE--
4<?php
5
6/** test */
7namespace foo {
8	function test() { }
9
10	$x = new \ReflectionFunction('foo\test');
11	var_dump($x->getDocComment());
12
13	/** test1 */
14	class bar { }
15
16	/** test2 */
17	class foo extends namespace\bar { }
18
19	$x = new \ReflectionClass('foo\bar');
20	var_dump($x->getDocComment());
21
22	$x = new \ReflectionClass('foo\foo');
23	var_dump($x->getDocComment());
24}
25
26?>
27--EXPECTF--
28bool(false)
29string(12) "/** test1 */"
30string(12) "/** test2 */"
31