WebSmithery opened a new issue, #7795:
URL: https://github.com/apache/netbeans/issues/7795
### Apache NetBeans version
Apache NetBeans 23
### What happened
In PHP, function names can be constructed as strings at runtime.
Such a process can involve joining two strings together, one of which is a
variable.
These strings could be joined using the concatenation operator
<code>('string_literal' . $stringVariable)</code> or by using double quotes so
that PHP parses the variable <code>"string_literal$stringVariable"</code>, and
this can be done at the actual function call
<code>"string_literal$stringVariable()"</code>
If the concatenation operator is used, NetBeans is perfectly happy, but if
double quotes and variable parsing is used, NetBeans flags it as a syntax error:

### Language / Project Type / NetBeans Component
PHP project
### How to reproduce
Enter this code in a PHP file:
```
<?php
$type = 'int';
$isType = "is_$type"(7);
var_dump($isType);
```
NetBeans should accept this code without issue, yet it flags it as a syntax
error.
It can be verified that there is no such syntax error by running the code.
PHP runs the code without errors or warnings, outputting `bool(true)` (because
7 _is_ an integer).
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 10 Pro, Version 22H2, OS build 19045.4046
### JDK
Java Platform SE 22.0.2
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists