Re: feature : get_include_history () (was : Re:[PHP-DEV] included_by() possible?)

From: Date: Mon, 28 Aug 2000 08:22:40 +0000
Subject: Re: feature : get_include_history () (was : Re:[PHP-DEV] included_by() possible?)
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-30927@lists.php.net to get a copy of this message
Andi, There more language features that are optional through INI directives, the harder it gets to produce a working code library like PEAR. Just wanted to remind you. Is the overhead worse than some stack operations when using include/require? - Stig Andi Gutmans wrote: > > This whole thing will slow things down a bit but in the least we should > make it an INI directive. > Bring it up again after 4.0.2 and we can brainstorm about it. > There might be some more general approach to this. > Andi > > At 03:06 AM 8/26/00 +0200, Flavien Lebarbé wrote: > >Hello, > > > >André, you do not need to convince me how such a future would be > >useful... Having error messages saying : > >"Error in blah.inc, line 13 > >included from foo.inc line 15 > >included from bar.inc line 623" > >as well as beeing able to "get_include_history()" which returns > >the status of this stack would help php developpers _a lot_ I > >think. :) > > > > > >As for implementation of this feature, I just had a look at it : > >zend_execute, line 1957 is the place to go I think. > > > >pseudo-code : > > > >[line 2028] push ( &include_history_stack , > > inc_filename->value.str.val , > > CG(zend_lineno) ); > >[line 2029] zend_execute(...); > >[line 2030] pop ( &include_history_stack ); > > > >Add a new function to ZEND : > >get_include_history () > >{ > >/* dump include_history_stack into a php array and return it */ > >} > > > >Modify zend_error to display this too. > > > > > >What do Zend-gurus think about this ? Is it something that can > >be done this way, would it be better to do it differently ? > >Am I missing something ? Ideas ? Comments anyone ? > > > >Flavien. > > > >-- > >PHP Development Mailing List <http://www.php.net/> > >To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > >For additional commands, e-mail: php-dev-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > --- > Andi Gutmans <andi@zend.com> > http://www.zend.com/ > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.dev (#30927) next »