Edit report at https://bugs.php.net/bug.php?id=68183&edit=1
ID: 68183
Updated by: [email protected]
Reported by: [email protected]
Summary: Several postfix expressions are not valid for
function call
Status: Open
Type: Bug
Package: PHP Language Specification
PHP Version: PHP-5.6
Block user comment: N
Private report: N
New Comment:
> postfix-increment-expression
> postfix-decrement-expression
It is already stated that "the operand of the […] operators must
be a modifiable lvalue that has scalar-compatible type.
> exponentiation-expression
I'm not sure to what you are referring to. The following works as
expected (see <https://3v4l.org/YK35q>):
trim('2') ** trim('3')
> The meaning of y in $x->y() and $x->y differs so I am not sure
> it should be swept into a single "member-selection-expression".
Syntactically, it has to.
> member-selection-expression
>
> it feels weird. I mean http://3v4l.org/ZeZR1 is not doable
> without a separate variable.
This issue has been addressed as of PHP 7.0.0. For PHP 5.6 the
langspec is indeed in error, because the code would be
syntactically valid and the langspec doesn't mention a respective
constraint.
Previous Comments:
------------------------------------------------------------------------
[2014-10-08 08:16:10] [email protected]
Description:
------------
Even in PHP 7
postfix-increment-expression
postfix-decrement-expression
exponentiation-expression
These one produce syntax errors and make no sense especially because exponentation is definitely numeric while function names must start with a letter (or so I thought).
member-selection-expression
it feels weird. I mean http://3v4l.org/ZeZR1 is not doable without a separate variable. The meaning of y in $x->y() and $x->y differs so I am not sure it should be swept into a single "member-selection-expression".
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=68183&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.