Re: ce->doc_comment and ReflectionClass::getDocComment

From: Date: Sat, 28 Feb 2009 18:22:40 +0000
Subject: Re: ce->doc_comment and ReflectionClass::getDocComment
References: 1 2  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-6177@lists.php.net to get a copy of this message
Johannes Schlüter writes: > Hi, Hi! >> >> Reflection works very nice for internal classes. Why this method can not? > > Interesting question, never looked into that myself. After digging > around a bit I saw that, when initializing the class entry we aren't > initializing the doc_comment field. So currently it might point to some > random memory. While changing that should be quite simple. > > http://lxr.php.net/source/ZendEngine2/zend_API.h#163 Change is easy. Problem is, that (even if you fix it) , it will be available in distros in next few years. Which means you can forget about efficient documentation system. > Not sure whether there are other things to consider and whether there's > a reason. If ZEND_ARG_INFO provides info for reflection, what is the sense to provide only part of it? Number of required arguments is a nice thing, even human readable argument names are. But both are quite useless to make real documentation. Anyway, I can provide access to doc_comment via own extension, but would be cool if there's something wrong with this member. Piotras

« previous php.pecl.dev (#6177) next »