Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25154 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11387 invoked by uid 1010); 2 Aug 2006 22:54:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 11372 invoked from network); 2 Aug 2006 22:54:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Aug 2006 22:54:46 -0000 X-PHP-List-Original-Sender: ceo@l-i-e.com X-Host-Fingerprint: 67.139.134.202 o2.hostbaby.com FreeBSD 4.7-5.2 (or MacOS X 10.2-10.3) (2) Received: from ([67.139.134.202:3972] helo=o2.hostbaby.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 8C/3B-44390-2C321D44 for ; Wed, 02 Aug 2006 18:14:27 -0400 Received: (qmail 37155 invoked by uid 98); 2 Aug 2006 22:14:28 -0000 Received: from 127.0.0.1 by o2.hostbaby.com (envelope-from , uid 1013) with qmail-scanner-1.25 ( Clear:RC:1(127.0.0.1):. Processed in 2.139722 secs); 02 Aug 2006 22:14:28 -0000 X-Qmail-Scanner-Mail-From: ceo@l-i-e.com via o2.hostbaby.com X-Qmail-Scanner: 1.25 (Clear:RC:1(127.0.0.1):. Processed in 2.139722 secs) Received: from unknown (HELO l-i-e.com) (127.0.0.1) by localhost with SMTP; 2 Aug 2006 22:14:26 -0000 Received: from 67.108.68.40 (SquirrelMail authenticated user ceo@l-i-e.com) by www.l-i-e.com with HTTP; Wed, 2 Aug 2006 17:14:26 -0500 (CDT) Message-ID: <65312.67.108.68.40.1154556866.squirrel@www.l-i-e.com> In-Reply-To: <1153018028.3177.4.camel@blobule> References: <347185750.20060715202622@marcus-boerger.de> <20060715204801.4e02c985@pierre-u64> <56975.64.4.222.245.1153017351.squirrel@www.l-i-e.com> <1153018028.3177.4.camel@blobule> Date: Wed, 2 Aug 2006 17:14:26 -0500 (CDT) To: internals@lists.php.net Reply-To: ceo@l-i-e.com User-Agent: Hostbaby Webmail MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] Re: Long awaited line directive From: ceo@l-i-e.com ("Richard Lynch") On Sat, July 15, 2006 9:47 pm, Robert Cummings wrote: > This has some really good implications for helping PHP users get the > line numbers more correct. For instance, from what I gather, my > template > engine can use this to dynamically generate PHP code from an XML tag > and > when the generated code fails due to some syntax error based on the > tag's attributes, If my engine included this directive then the engine > will tell them in what included template source file and on what line > they screwed up rather than them seeing an error that has no obvious > relationship whatsoever to what they did (did I get that right > Marcus?). So, what would the code look like that fixes this issue, from the sample posted? It seems to me like you're still going to get an error message about the right line number, but in the wrong file name. Or is #file also going in with #line, so your template engine can forge the filename for __FILE__ to the included file? I can see that working to solve this for you. Working backwards from generated code to source files in templates is never fun, but solving this in PHP code instead of the template itself seems like a case of killing a fly with a cannon. It may make life a tiny bit easier for the experts, but I suspect #line is going to be abused by the naive to make life hell on the masses... -- Like Music? http://l-i-e.com/artists.htm