Am 27.7.2014 um 10:55 schrieb Stas Malyshev <smalys...@sugarcrm.com>:
> Hi!
> 
>> Yes, I agree that this is not correct behavior - and I don't really
>> understand why it was introduced and why it isn't trivial to fix.
>> PHP-5.5 had a check for this case in place
>> (http://lxr.php.net/xref/PHP_5_5/Zend/zend_compile.c#7071) and phpng
>> contains an AST-compatible variant of the array check
>> (http://lxr.php.net/xref/phpng/Zend/zend_compile.c#7776). Shouldn't
>> copying the condition from phpng into PHP-5.6 resolve this issue?
> 
> I agree it should be easy to fix it this way, but I'd like for Bob to
> provide a bit more input here as to best way to resolve it. I'm not sure
> why usage of arrays in runtime is disallowed now in 5.6 code, so I'm not
> sure if we should enable it or remove it.
> 
> If we don't find another way soon, I guess porting one from phpng is
> what we'll have to do.
> -- 
> Stanislav Malyshev, Software Architect
> SugarCRM: http://www.sugarcrm.com/


The AST compatible fix in phpng is just for top-level arrays, but not for 
something like "constant ? [1] : [2]".

I think we should just enable it, that would lower the level of confusion.

I totally agree that current status isn't optimal.

Bob

Reply via email to