-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed bug #55156 (ReflectionClass::getDocComment() returns comment …
…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
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */" |