Re: [PATCH] allow T_INLINE_HTML before T_NAMESPACE

From: Date: Fri, 12 Sep 2008 21:13:12 +0000
Subject: Re: [PATCH] allow T_INLINE_HTML before T_NAMESPACE
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-40490@lists.php.net to get a copy of this message
Lucas Stephanou wrote: > My first msg in this list > > And I agree with you David. > > Mix html and namespace is very very ugly. > > > > 2008/9/12 David Coallier <davidc@php.net>: >> 2008/9/12 Greg Beaver <greg@chiaraquartet.net>: >>> Hi, >>> >>> This is a simple patch that allows files like this: >>> >>> main.php: >>> >>> <html> >>> <head> >>> <title>template example</title> >>> </head> >>> </html> >>> <body> >>> <?php >>> namespace my::template; >>> // stuff >>> ?> >>> </body> >>> >> Is it me or this doesn't look really clean? I have a clear idea that >> namespaces are there to add an extra structural layer to the code and >> not to be randomly used in some HTML/PHP/Javascript mixing. >> >> Since the current namespace implementation doesn't want to have >> multiple namespaces per file, I think we should restrict a namespace >> per file to... a namespace per file, and nothing else. I can't imagine >> taking over someone's code who had declared a namespace under is >> footer template. >> >> Perhaps I am missing something but that would be bloody ugly in the end :) >> >> -- >> Slan, >> David >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > > -- > Lucas Stephanou > > > Ugh, don't top-post please the issue is without the patch, even an empty space or a newline at the start of a file will cause a fatal error Thanks, Elizabeth

« previous php.internals (#40490) next »