|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62790 Operator "->" missing in operator lists
Submitted: 2012-08-10 10:47 UTC Modified: 2013-10-24 08:58 UTC
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:3 (100.0%)
From: matteosistisette at gmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: matteosistisette at gmail dot com
New email:
PHP Version: OS:


 [2012-08-10 10:47 UTC] matteosistisette at gmail dot com
Operator "->" (access of object properties and methods) is not listed either 
nor here:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-25 19:16 UTC] jschoett at gmail dot com
It's the so called "object operator" (T_OBJECT_OPERATOR), which is missing.
According to doc comment

Please fix this -- I really want to know which precedence this operator has!
 [2013-10-24 06:52 UTC]
-Status: Open +Status: Not a bug
 [2013-10-24 06:52 UTC]
The question doesn't make any sense, closing the bug.
 [2013-10-24 08:58 UTC] matteosistisette at gmail dot com
@krakjoe Would you expand a little bit?
An operator is missing in the list that documents operator precedence, so there is no way to know what is the precedence of that operator compared to others.

What's the part that you don't understand? What doesn't make sense to you? Why should it be ok that the precedence of that operatos is not documented?
 [2013-10-24 09:08 UTC] matteosistisette at gmail dot com
Or do you need an example? Here it is:

  class Test { 
    public $foo=1;
    public $bar=2;
    public $foobar="3";
  $test=new Test();
  echo $test->$p1.$p2;

How is one supposed to know (other than by trying) that the output will be "1bar" and not "3"? (not to mention that it will produce a parse error prior to 5.0)
 [2013-10-24 09:10 UTC] matteosistisette at gmail dot com
(forget the part about the parse error; the rest is still valid)
 [2013-10-24 10:43 UTC] gabri dot ns at gmail dot com
even the array operator "[" is documented...
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jul 29 08:01:23 2021 UTC