条件存储在变量中的费用(php)

In php, is this:

$ifTrue = ((1 == 1) and (2 == 2));
if ($ifTrue) {
  echo "derp";
}

more expensive than this:

if ((1 == 1) and (2 == 2)) {
    echo "derp";
}

I've taken to storing my conditional expressions in variables to cleanup multi-line if statements. So far, I have seen no difference in performance. But my feeling is that because I am reserving a location in memory by doing this, I am gradually eating up memory and, for big scripts, this might be a huge hit to performance that might go undetected.

Follow-up question: Would there be any difference in expense in other languages such as javascript or perl?

First of: premature optimization will always cause troubles. Don't try to do it if you don't know certain conditions.

Next, your answer depends on circumstances. For example, how many times your expression will be used? Sample: let it be:

$foo = very_expensive_function_here();

if($foo)
{
}
//
if($foo && something_else_1())
{
}
//...
if($foo && something_else_1000())
{
}

-in this case you'll get extreme increasing of speed since you'll get rid of 1000 expensive function execution times.

But what if your case is just single & simple bool expression? Then it all makes no sense - why use temporary variable at all if you can just evaluate expression on the fly and once?