| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2005-08-25 15:20 UTC] sniper@php.net
  [2005-08-26 21:03 UTC] johannes@php.net
  [2005-09-21 11:57 UTC] helly@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 06:00:01 2025 UTC | 
Description: ------------ The getDocComment() method from the Reflection API (in this case, the ReflectionClass class) returns no result where an if block exists before the documentation comment. Reproduce code: --------------- if (!class_exists('AnotherObject')) { require("anotherobject.php"); } /** * Comment to test getDocComment() */ class TestObject { } $rclass = new ReflectionClass('TestObject'); echo "Comment: '".$rclass->getDocComment()."'"; Expected result: ---------------- Comment: '/** * Comment to test getDocComment() */' Actual result: -------------- Comment: ''