On Wed, Mar 26, 2008 at 8:55 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > Hi! > > > > I don't think I've ever said I don't like short tags. It's not the issue > > here. The issue is that allowing to change it during runtime adds more > > WTF to PHP. WTF factors are bad. > > OK, there were people saying short tags are mortal sin, devil's device > to lure pure souls into the hell and what not. Good that you don't :) > Speaking of the WTF, I don't really see any major WTF since: > 1. 99.9% of the code (except for parser XML templates) works with any > tags settings. One that wouldn't work will bail out immediately with > clearly recognized error message, so the problem would be easy to locate > and fix. > 2. For any code messing with this value - and this code should be only > one place in whole application, the template engine - it is very easy to > restore it afterwards, and any programmer smart enough to write in PHP > would know to do that. > 3. There are a bunch of runtime settings that some code can influence > other code with - most prominent being include path - and we had very > little problem with them being INI_ALL. > 4. This change actually does not remove any existing scenarios and adds > one previously impossible - having short tag templates in the context > where enabling short tags for whole application is not desired.
You do know that having short tags enabled will result in a parse error in the following situation, right?: foo.php <?xml version="1.0"> <root> <?php foreach($array as $el => $val) { printf('<%s>%s</%2$s>', $el, $val); } ?> </root> I actually think that by now the most common way to do exactly this is: echo '<?xml version="1.0">'; so being PHP_INI_ALL isn't the worst idea ever - but I still think it'll just create more wtf then necessary. -Hannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php