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