Skip to content

Commit

Permalink
- Fixed bug #55156 (ReflectionClass::getDocComment() returns comment …
Browse files Browse the repository at this point in the history
…even though the class has none)

git-svn-id: http://svn.php.net/repository/php/php-src/branches/PHP_5_3@313056 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information
felipe committed Jul 7, 2011
1 parent 466fae2 commit 369dfe9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
30 changes: 30 additions & 0 deletions Zend/tests/bug55156.phpt
Original file line number Diff line number Diff line change
@@ -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 */"

0 comments on commit 369dfe9

Please sign in to comment.