mirror of
https://github.com/php/php-src.git
synced 2024-09-28 21:36:12 +00:00
31 lines
559 B
Plaintext
31 lines
559 B
Plaintext
|
--TEST--
|
||
|
Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
/** test */
|
||
|
namespace foo {
|
||
|
function test() { }
|
||
|
|
||
|
$x = new \ReflectionFunction('foo\test');
|
||
|
var_dump($x->getDocComment());
|
||
|
|
||
|
/** test1 */
|
||
|
class bar { }
|
||
|
|
||
|
/** test2 */
|
||
|
class foo extends namespace\bar { }
|
||
|
|
||
|
$x = new \ReflectionClass('foo\bar');
|
||
|
var_dump($x->getDocComment());
|
||
|
|
||
|
$x = new \ReflectionClass('foo\foo');
|
||
|
var_dump($x->getDocComment());
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
bool(false)
|
||
|
string(12) "/** test1 */"
|
||
|
string(12) "/** test2 */"
|