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

From: Date: Mon, 16 Apr 2012 19:39:40 +0000
Subject: Re: Re: Go for votes for the open tag-less PHP files
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-60010@lists.php.net to get a copy of this message
On 4/16/2012 1:02 PM, Kris Craig wrote:
On Mon, Apr 16, 2012 at 10:31 AM, Rick WIdmer<vchkpw@developersdesk.com>wrote:
More important include doesn't currently allow multiple parms: include "foo.bar", 'baz'; Parse error: syntax error, unexpected ',' in bla.php on line xx
Regarding include/require, I agree that any BC break would be extremely minimal. In the 10+ years I've been developing PHP, I don't think I've ever once seen somebody include multiple scripts on a single line (I wasn't even aware that such a thing was allowed).
See above. It is not allowed now.
How about we just keep the parentheses optional and comma-seperate the arguments? For example, the require syntax could look like this: require[(] $script_filename, $script_type = PHP_SCRIPT_TYPE_NORMAL [)];
include/require are language constructs. They do not require () around the parms, and making it optional probably isn't reasonable. OTOH, since it currently only allows one parm, adding a second, optional parm should be no problem.

« previous php.internals (#60010) next »