Re: [PHP-DEV] Fatal error: isset(CONST_ARRAY['key']) PHP 5.6

2015-05-25 Thread S.A.N
> There was some discussion on contant arrays on Stackoverflow with an > answer by Andrea Faulds (with a link to changes between 5.6 and 7.0): > http://stackoverflow.com/a/27413238/872051 Ok, thank. Why the speed of access to const the array ARR['key'] is 500% slower, in comparison with the varia

Re: [PHP-DEV] Fatal error: isset(CONST_ARRAY['key']) PHP 5.6

2015-05-25 Thread Jan Ehrhardt
"S.A.N" in php.internals (Mon, 25 May 2015 16:09:42 +0300): >> It is by design; the documentation states[1]: >> >> | isset() only works with variables as passing anything else will >> | result in a parse error. >> >> [1] >>

Re: [PHP-DEV] Fatal error: isset(CONST_ARRAY['key']) PHP 5.6

2015-05-25 Thread S.A.N
> It is by design; the documentation states[1]: > > | isset() only works with variables as passing anything else will > | result in a parse error. > > [1] > Ok, the way it works in PHP 7. But the speed of access to const

Re: [PHP-DEV] Fatal error: isset(CONST_ARRAY['key']) PHP 5.6

2015-05-25 Thread Christoph Becker
S.A.N wrote: > > const CONST_ARRAY = > [ > 'key' => 'value' > ]; > > isset(CONST_ARRAY['key']); // Fatal error: Cannot use isset() on the > result of an expression (you can use "null !== expression" instead) > > ?> > > It is design, or a bug? It is by design; the documentation states[1]: