Bug #70514 [Com]: isset(aClass::ARRAY[$a]) is mistaken for an expression

From: Date: Wed, 18 May 2016 15:31:59 +0000
Subject: Bug #70514 [Com]: isset(aClass::ARRAY[$a]) is mistaken for an expression
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201182@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70514&edit=1

 ID:                 70514
 Comment by:         phansys at gmail dot com
 Reported by:        dams@php.net
 Summary:            isset(aClass::ARRAY[$a]) is mistaken for an
                     expression
 Status:             No Feedback
 Type:               Bug
 Package:            Class/Object related
 Operating System:   OSX, Debian
 PHP Version:        7.0.0RC2
 Block user comment: N
 Private report:     N

 New Comment:

This issue is present in 5.6.21 version too.


Previous Comments:
------------------------------------------------------------------------
[2015-10-11 04:22:32] php-bugs at lists dot php dot net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.

------------------------------------------------------------------------
[2015-09-28 09:10:50] dams@php.net

I confirm the situation from bwoebi : 

aClass::X[$a] (or static::X[$a]) work fine.

isset(aClass::X) still does not work. 

The revision is 250938e2d35fc54161a18167b7901c5e3b574371. 
I'll keep testing until the 2nd instruction is ok. The rest is good to for, AFAIK

------------------------------------------------------------------------
[2015-09-22 15:16:39] dams@php.net

I tried with bison 2.7 and 3.0.4, with the same result. 

I use this compilation sequence : 
make clean

./buildconf --force
env YACC=brew --prefix bison27/bin/bison 
./configure \
    --prefix="/usr/local/opt/phpng" \
    --with-config-file-path="/usr/local/etc/phpng" \
    --with-config-file-scan-dir=/usr/local/etc/phpng/conf.d
    --enable-mbstring \
    --enable-tokenizer \
    --disable-all
make -jsysctl -n hw.logicalcpu_max

on #master from php-src. 

It is working fine on Debian.

------------------------------------------------------------------------
[2015-09-19 01:24:35] bwoebi@php.net

Works for me on OS X with PHP 7...

Just on PHP 5.6, isset() did not support constant arrays at all. I just had forgotten to take care
of that special case back then.

isset(aClass::X) still does not work with PHP 7, but aClass::X[$a] (or static::X[$a]) definitely
should work there.

------------------------------------------------------------------------
[2015-09-18 17:47:44] iletisim at ilkerozcan dot com dot tr

Works on ubuntu but does not work on OsX. It may be due to the bison version.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=70514


--
Edit this bug report at https://bugs.php.net/bug.php?id=70514&edit=1


Thread (10 messages)

« previous php.bugs (#201182) next »