php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #68804 Assign by ref operator is missing in precedence table
Submitted: 2015-01-12 03:28 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: sectus at mail dot ru Assigned:
Status: Open 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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sectus at mail dot ru
New email:
PHP Version: OS:

 

 [2015-01-12 03:28 UTC] sectus at mail dot ru
Description:
------------
It seems that documentation is not clear about references. 

There is no mentioning about `assign by ref` operator(http://php.net/manual/en/language.operators.precedence.php). And its precedence is higher than `instanceof`. 

Also, there is exists mentioning of `left | & | bitwise and references`. What is a meaning of `references` in this line?

Test script:
---------------
$a = &$b instanceof stdClass;
$c =  $d instanceof stdClass;

// line     # *  op                   fetch          ext  return  operands
// -------------------------------------------------------------------------
//    3     0  >   ASSIGN_REF                               $0      !0, !1
//          1      FETCH_CLASS                          84  :1      'stdClass'
//          2      INSTANCEOF                               ~2      $0, $1
//          3      FREE                                             ~2
//    4     4      FETCH_CLASS                          84  :3      'stdClass'
//          5      INSTANCEOF                               ~4      !3, $3
//          6      ASSIGN                                           !2, ~4
//          7    > RETURN                                           1



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-02-20 21:40 UTC] cmbecker69 at gmx dot de
Related to #69091[1].

[1] <https://bugs.php.net/bug.php?id=69091>
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Sep 25 06:01:24 2018 UTC