PHP parser shows error when calling functions from const
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 21
### What happened
Valid PHP code shows error:

### Language / Project Type / NetBeans Component
PHP
### How to reproduce
```php
'is_bool',
];
private function verifyTypes(string $type, mixed $value, array &$invalidTypes, int $level = 0): bool
{
return isset(self::VALIDATION_FUNCTIONS[$type]) ? self::VALIDATION_FUNCTIONS[$type]($value) : $value instanceof $type;
}
}
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
macOS 14.4.1
### JDK
openjdk version "21.0.2" 2024-01-16
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Open the provided PHP snippet in Apache NetBeans 21 and reproduce the parser error in the PHP editor. Trace the PHP parser or inspection responsible for rejecting the callable retrieved from the class constant. Done means this valid example no longer shows a parser error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100