Array constant PHP and isset suport
Hello again.
php7 have new suport with array constant but phpstorm not.
if(!isset(self::EVENT[$event])){
throw new \Exception('event doesn't exist');
}
$this->event = $event;
phpstorm throw the error: Expected variable
Please sign in to leave a comment.
Hi there,
It must be a bug in PhpStorm.
https://youtrack.jetbrains.com/issue/WI-30239 --> https://youtrack.jetbrains.com/issue/WI-27451 -- watch this ticket (star/vote/comment) to get notified on any progress.
Hello,
this is not the same thing.
PHP 7 allows declarations of array constants
then, to check if a color is set
However PhpStorm, even setting PHP to v7, shows a syntax error "Expecting: variable" after isset.
Is there a way to configure this, or do we have to wait for a coming version?
Thanks
Actually, it is the same thing. Have you taken a look at WI-30239?
There's no way to configure this, we have to wait until the causing issue is fixed.
come on!!! It's a very annoying mistake
still not fixed?? Its been two years!!
Fix this please. Wery annoying bug!
Commenting here with "please fix asap" wouldn't help much. Please vote/comment https://youtrack.jetbrains.com/issue/WI-30239 instead.