mirror of
https://github.com/php/php-src.git
synced 2024-11-28 04:14:26 +08:00
- Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even though the class has none)
This commit is contained in:
parent
774e127a00
commit
1cf3ec5eab
4
NEWS
4
NEWS
@ -1,6 +1,10 @@
|
||||
PHP NEWS
|
||||
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||
?? ??? 2011, PHP 5.3.7
|
||||
- Zend Engine:
|
||||
. Fixed bug #55156 (ReflectionClass::getDocComment() returns comment even
|
||||
though the class has none). (Felipe)
|
||||
|
||||
- Core
|
||||
. Fixed bug #53727 (Inconsistent behavior of is_subclass_of with interfaces)
|
||||
(Ralph Schindler, Dmitry)
|
||||
|
30
Zend/tests/bug55156.phpt
Normal file
30
Zend/tests/bug55156.phpt
Normal file
@ -0,0 +1,30 @@
|
||||
--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 */"
|
Loading…
Reference in New Issue
Block a user