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 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php