On Mon, Apr 16, 2012 at 9:46 AM, Arvids Godjuks <arvids.godj...@gmail.com>wrote:
> What happened with the proposal/RFC for expanding include/require with > additional optional second param to allow for developers to define in place > if he want's a pure PHP file to be included or a template file with direct > HTML output? > I like that proposal and take it over any other, because it gives developer > a choice. there is a valid issue which was discussed on irc yesterday: because include/require is a language construct, not a method, one is allowed, even advised to write the include/require calls without putting out the parentheses. if we introduce additional arguments for include/require, the following code will break: echo include 'foo.bar', 'baz'; as currently it was interpreted as echo include('foo.bar'), 'baz'; ofc. we could make that the additional params to include, require would only used, if the parentheses are uses, but that would make require/include inconsistent with every other language construct, where the parentheses is optional. so we either accept this BC, or not pursue this option, but go with the new functions/opcodes like include_code/require_code or similar. -- Ferenc Kovács @Tyr43l - http://tyrael.hu