Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:75945 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13604 invoked from network); 23 Jul 2014 09:50:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2014 09:50:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=derick@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=derick@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 82.113.146.227 as permitted sender) X-PHP-List-Original-Sender: derick@php.net X-Host-Fingerprint: 82.113.146.227 xdebug.org Linux 2.6 Received: from [82.113.146.227] ([82.113.146.227:54595] helo=xdebug.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DE/47-21666-0758FC35 for ; Wed, 23 Jul 2014 05:50:41 -0400 Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id D6DA910C009; Wed, 23 Jul 2014 10:50:38 +0100 (BST) Date: Wed, 23 Jul 2014 10:50:38 +0100 (BST) X-X-Sender: derick@whisky.home.derickrethans.nl To: Aaron Lewis cc: PHP Internals In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] How do I know if the code is in eval? From: derick@php.net (Derick Rethans) 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