Re: How do I know if the code is in eval?
| From: | Derick Rethans | Date: | Wed, 23 Jul 2014 09:50:38 +0000 |
| Subject: | Re: How do I know if the code is in eval? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75945@lists.php.net to get a copy of this message | ||
On Wed, 23 Jul 2014, Aaron Lewis wrote:
> Hi,
>
> How can I know the line no in eval()'d code?
>
> e.g eval()'d code on line 1 (I couldn't find the definition of that
> output, so I had to ask it here)
>
> zend_get_executed_lineno(TSRMLS_C) doesn't seem to be the right value
AFAIK, it's all one string, so on one line. At least that's what the
engine "thinks".
> Also, I'm not sure how to tell if the code is in eval() either
zend_get_executed_filename has "eval()'d code" in the output:
https://github.com/derickr/xdebug/blob/master/xdebug_handler_dbgp.c#L378
cheers,
Derick
--
http://derickrethans.nl | http://xdebug.org
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
twitter: @derickr and @xdebug
Posted with an email client that doesn't mangle email: alpine