Re: feature : get_include_history () (was : Re: [PHP-DEV] included_by() possible?)
| From: | Andi Gutmans | Date: | Sat, 26 Aug 2000 14:49:28 +0000 |
| Subject: | Re: feature : get_include_history () (was : Re: [PHP-DEV] included_by() possible?) | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-30746@lists.php.net to get a copy of this message | ||
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/