On 07/04/12 17:22, John Bafford wrote: > On Apr 7, 2012, at 10:53, John Crenshaw wrote: >> What if you have just ONE function with a variety of options? Something like: >> >> execute_file('path/to/foo.php', array( >> 'require'=>true, >> 'once'=>true, >> 'begin_code'=>'<?php ', >> 'shorttags'=>array('<?=','?>'), >> 'autoescape'=>function($str){return htmlentities($str, ENT_QUOTES | >> ENT_HTML5, 'UTF-8');}, >> ... >> )); > While there's some elegance with your execute_file (there'd definitely be > benefits to one function instead of the four we have now), the extra options > would spawn so much Daily WTF material it wouldn't be funny, and I think most > people would just stick with include/require/*_once because there'd be a lot > less effort in the common case. I agree that the free-form tags could lead to much Daily WTF material, but there's a simplett reason to reject it: The tags are hardcoded in the lexer. Making it anything can drop perfomance.
However, they could be possible as booleans, just as many of them are now in php.ini. And I like the idea of providing a function for auto escaping <?= echos. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php