Is it possible to perform an assignment in a PHP return statement?
<p>I have a quick question regarding PHP's return statement. In C++, we're able to perform the following:</p>

<pre><code>... function body ...
return (foo = bar, biz());
</code></pre>

<p>Where the variable <code>bar</code> is assigned to <code>foo</code> before the result of <code>biz()</code> is returned.</p>

<p>Is this possible (or something similar) in PHP? The above statement in PHP results in a parse error. Now, I'm aware that I can simply perform the assignment before the return statement, but this is just a contrived example, and I'm curious as to the feasibility. </p>

<p><strong>Edit</strong>: Providing a little more clarification. Here is what I'm basically attempting to do in PHP:</p>

<pre><code>return ($foo = $bar, biz())
    || ($foo = $bar, baz())
    || ($foo = $bar, qux());
</code></pre>

<p><code>foo</code> is a global reference in which <code>biz</code> modifies. If <code>biz</code> returns false, the next segment in the OR statement is tested. Because <code>biz</code> returned false, I need to "reset" the value of <code>foo</code> before executing <code>baz</code> and so on and so forth. </p>

<p><strong>I'm aware that what I'm trying to do here is impure, but I'm just curious is an equivalent (or at least similar thing) is possible in PHP.</strong></p>
