<p>Let's say I have this code:</p>

<pre><code>if (md5($_POST[$foo['bar']]) == $somemd5) {
  doSomethingWith(md5($_POST[$foo['bar']]);
}
</code></pre>

<p>I could shorten that down by doing:</p>

<pre><code>$value = md5($_POST[$foo['bar']];
if ($value == $somemd5) {
  doSomethingWith($value);
}
</code></pre>

<p>But is there any pre-set variable that contains the first or second condition of the current if? Like for instance:</p>

<pre><code>if (md5($_POST[$foo['bar']]) == $somemd5) {
  doSomethingWith($if1);
}
</code></pre>

<p>May be a unnecessary way of doing it, but I'm just wondering.</p>

No, but since the assignment itself is an expression, you can use the assignment as the conditional expression for the if statement.
```
if (($value = md5(..)) == $somemd5) { ... }
```
In general, though, you'll want to avoid embedding assignments into conditional expressions:
The code is denser and therefore harder to read, with more nested parentheses.
Mixing = and == in the same expression is just asking for them to get mixed up.