On Sun, Jul 27, 2014 at 12:02 AM, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> Hi! > > > Could somebody please clarify what issues are still open here? From what > > I understand, both the opcache issue and the recursion issue are fixed > > now. What's the discussion about? > > As I understand, the issue is that if you define class constant like this: > > class Foo { const Bar = [0]; } > > everything works fine. But if you do var_dump(Foo::Bar), it bombs out > with fatal error (the same goes for every other usage of that constant > in expression). Please correct me if my info is outdated, but I think it > is a behavior that should not be left in the release. If for some reason > we can't make array constants work normally, we should just omit them > altogether. > 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? Nikita