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