On Mon, 30 Jun 2003, Elfyn McBratney wrote:
> On Mon, 30 Jun 2003, George Schlossnagle wrote:
>
> > On Monday, June 30, 2003, at 12:04 PM, Andi Gutmans wrote:
> >
> > > I must be thick. I don't quite understand how the source relates to
> > > what is described in the .png. Take for example the following from the
> > > api.c file:
> >
> > I talked this over with Marcus. The FE/FALIAS pairs are designed to
> > avoid namespace conflicts with the other (not yet existent) reflection
> > classes. I better solution will be to write a new macro that allows
> > ZEND_FUNCTION(php_function_getstartline) to be registered as a class
> > method directly as 'getstartline). I'll modify my patch shortly. If
> > something like that exists already, a pointer to it would be swell.
> >
> > Otherwise the functions work as follows:
> >
> > <?php
> >
> > /**
> > Doc comment goes here
> > */
> > function counter() {
> > static $i = 0;
> > return $i++;
> > }
> >
> > $obj = new PHP_Function("counter");
> >
> > print $obj->getName()." was decared in ".$obj->getFileName()." starting
> > at ".$obj->getStartLine().
> > "and ending at ".$obj->getEndline."\n";
> > print "Here is what it's docs have to say: "$obj->getDocComment(). "\n";
> > if($statics = $obj->staticVariables()) {
> > print $obj->getName()." has the following static
> > variables:\n".print_r($statics);
> > }
> > print $obj->invoke();
> >
> > Something like that.
>
> This looks really Cool!.
>
> BTW, have you looked at ZEND_NAMED_FE() in php-src/php/php.h ? I think that does
^^^^^^^^^^^^^^^^^
s%/php/%/main%
> what you need.
>
> Elfyn
Hmm.. should have looked at your reply first, eh? :)
Elfyn
--
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php