Hello,
2012/4/10 Ángel González <[email protected]>:
> 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.
>
>
I understand your point that you are trying to make, but forward
compatibility I am not sure shares the same critical nature as
backwards. I think a software provider who is aiming at supporting a
wide variety of php versions is likely going to code around the lowest
common denominator. Even still, if they chose to they could have two
bootstrap files, one that included files with the new features and one
with the old.