title: Operator and assignment at the same time in PHP?
body: <p>In this statement:</p>
  
  <pre><code>1 + $newVar = 200;
  </code></pre>
  
  <p>$newVar gets created and assigned the value of 200.  How does this work?  <a href="http://php.net/manual/en/language.operators.precedence.php" rel="noreferrer">Precedence rules</a> show that the addition takes place first, before the assignment.  I can't wrap my head around this.  How does the assignment take place if the variable is evaluated with the + operator first?</p>
  
  <p>PHP provides this little nugget.  Does this mean these rules apply except when they don't?</p>
  
  <blockquote>
    <p>Note:</p>
    
    <p>Although = has a lower precedence than most other operators, PHP will
    still allow expressions similar to the following: if (!$a = foo()), in
    which case the return value of foo() is put into $a.</p>
  </blockquote>