Bug #70650 [Asn->Csd]: Wrong docblock assignment

From: Date: Wed, 07 Oct 2015 14:27:55 +0000
Subject: Bug #70650 [Asn->Csd]: Wrong docblock assignment
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196452@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70650&edit=1 ID: 70650 Updated by: nikic@php.net Reported by: marcio@php.net Summary: Wrong docblock assignment -Status: Assigned +Status: Closed Type: Bug Package: Reflection related PHP Version: 7.0.0RC4 Assigned To: marcio Block user comment: N Private report: N New Comment: Automatic comment on behalf of marcio3w@gmail.com Revision: http://git.php.net/?p=php-src.git;a=commit;h=ddb6d7801e5dfc2f196b549b8ad51376cdc1bc90 Log: Fix bug #70650 Previous Comments: ------------------------------------------------------------------------ [2015-10-06 14:18:26] marcio@php.net Description: ------------ The parser/lexer seems to be collecting wrong docblocks on some edge cases. Live example https://3v4l.org/b4Jaq Test script: --------------- <?php class X { /** * @docblock1 */ public $x = "x", $y = 'y', /** @docblock2 */ $z = 'z' ; } $reflection = new ReflectionProperty('\X', 'x'); echo 'X::x', PHP_EOL; var_dump($reflection->getDocComment()); $reflection = new ReflectionProperty('\X', 'y'); echo 'X::y', PHP_EOL; var_dump($reflection->getDocComment()); $reflection = new ReflectionProperty('\X', 'z'); echo 'X::z', PHP_EOL; var_dump($reflection->getDocComment()); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70650&edit=1

« previous php.bugs (#196452) next »