Bug #71415 [Opn->Csd]: ReflectionClass::__toString is not returning class docblock comment

From: Date: Wed, 20 Jan 2016 10:56:56 +0000
Subject: Bug #71415 [Opn->Csd]: ReflectionClass::__toString is not returning class docblock comment
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198789@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71415&edit=1 ID: 71415 Updated by: krakjoe@php.net Reported by: boris dot momcilovic at gmail dot com Summary: ReflectionClass::__toString is not returning class docblock comment -Status: Open +Status: Closed Type: Bug Package: Reflection related Operating System: ArchLinux PHP Version: 7.0.2 -Assigned To: +Assigned To: krakjoe Block user comment: N Private report: N New Comment: The fix for this bug has been committed. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2016-01-19 20:32:40] boris dot momcilovic at gmail dot com Description: ------------ PHP 7 and newer seem to be stripping class docblock comments when invoked via ReflectionClass::__toString Test script: --------------- <?php /** * ClassDocComment * * @copyright Copyright (c) 2011 * @author author * @see http://php.net */ class ClassDocComment { } var_dump ((string) new ReflectionClass ('ClassDocComment')); // or https://3v4l.org/CFHvk Expected result: ---------------- string(305) "/** * ClassDocComment * * @copyright Copyright (c) 2011 * @author author * @see http://php.net */ Class [ &lt;user&gt; class ClassDocComment ] { @@ /in/CFHvk 10-12 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [0] { } } " Actual result: -------------- string(203) " Class [ &lt;user&gt; class ClassDocComment ] { @@ /in/CFHvk 10-12 - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [0] { } } " ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71415&edit=1

« previous php.bugs (#198789) next »