Assignment in conditionals
<p>I've seen a lot this kind of code recently :</p>

<pre><code>if ($foo = $bar-&gt;getFoo())
{
    baz($foo);
}
</code></pre>

<p>Is this considered good or bad practice ?</p>

<p>For example, Netbeans IDE give a notice if you use this kind of code :</p>

<blockquote>
  <p>Possible accidental assignment,
  assignments in conditions should be
  avoided</p>
</blockquote>

<p>What do you think ?</p>
