Don't worry about performance in this case - this kind of micro-optimization is meaningless, useless, and in short, a waste of time.
The only scenario where one would introduce temporary variables for performance reasons is when the result of a nontrivial calculation is used several times, and you want to avoid performing the calculation repeatedly. For example, in the following code:
for ($i = 0; $i < strlen($label); ++$i) {
print $label[$i] . "; ";
}
...strlen($label)
gets executed on every iteration, which is kind of wasteful, horribly so if your string is very long. In this situation, it pays off to precalculate the string length and store it in a variable:
$len = strlen($label);
for ($i = 0; $i < $len; ++$i) {
print $label[$i] . "; ";
}
So much for performance.
In a real-world situation, however, the first thing you want to optimize for is not performance, but maintainability, in this case in the form of readability. Depending on the situation, the introduction of intermediate variables can greatly enhance readability, and it is not unusual to find, after splitting up complex computations using this technique, that the code in question can be simplified a lot, making it both easier to read and more efficient.
return $arr['index']
,return $obj->property
,return $value + 1
, etc. If expression is more complicated and it's result can be named - I would use extra var.