Re: Re: Go for votes for the open tag-less PHP files

From: Date: Mon, 16 Apr 2012 08:24:02 +0000
Subject: Re: Re: Go for votes for the open tag-less PHP files
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-59991@lists.php.net to get a copy of this message
On Mon, Apr 16, 2012 at 9:46 AM, Arvids Godjuks <arvids.godjuks@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

« previous php.internals (#59991) next »