Bug #68183 [Opn->Csd]: Several postfix expressions are not valid for function call
| From: | nikic@php.net | Date: | Fri, 11 Nov 2016 21:57:38 +0000 |
| Subject: | Bug #68183 [Opn->Csd]: Several postfix expressions are not valid for function call | ||
| References: | 1 | Groups: | php.standards |
| Request: | Send a blank email to standards-+get-1167@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68183&edit=1
ID: 68183
Updated by: nikic@php.net
Reported by: chx@php.net
Summary: Several postfix expressions are not valid for
function call
-Status: Open
+Status: Closed
Type: Bug
Package: PHP Language Specification
PHP Version: PHP-5.6
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2016-11-11 21:57:27] nikic@php.net
Now at: https://github.com/php/php-langspec/blob/master/spec/10-expressions.md#member-access-operator
member-selection-expression has been split into member-access-expression and member-call-expression.
Additionally, both were adjusted to accurate specify what is allowed on their LHS (and RHS, for that
matter).
------------------------------------------------------------------------
[2016-06-29 14:42:43] cmb@php.net
> 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.
------------------------------------------------------------------------
[2014-10-08 08:16:10] chx@php.net
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