summaryrefslogtreecommitdiff
path: root/Zend/tests/bug55156.phpt
blob: 2dc47a11342cb95225edd42cb29b2243416c4841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--TEST--
Bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
--INI--
opcache.save_comments=1
--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());
}

?>
--EXPECT--
bool(false)
string(12) "/** test1 */"
string(12) "/** test2 */"