Re: RFC: source files without opening tag

From: Date: Tue, 10 Apr 2012 15:57:46 +0000
Subject: Re: RFC: source files without opening tag
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Luke Scott wrote:
>> if ( version_compare(PHP_VERSION, '5.5', '<') )
>>  include_once $file;
>> else
>>  require_code($file, array( 'once'=>true, 'warn' =>
>> 'ignore' ) );
> I'm fairly certain that wouldn't work either. Require and friends are
> constructs, not functions.
>
> Luke
I had assumed require_code would work with brackets around the parameters.
Someone mentioned it, but you raise a good point in that it's not stated
by the
rfc, and would need to be explicitely supported.

There are people calling require and friends with brackets, but that
likely (ie.
not looking at the lexer) works because the parameter is ('foo') which
resolves
as 'foo'. That wouldn't work when there are two of them.
I think it should be something to consider when making the patch, though.



Thread (109 messages)

« previous php.internals (#59649) next »