PHP won't cache it.
Performance wise, I doubt anyone here knows the exact difference between say... 4 function calls vs 1 function call + a variable. However function calls do have a slight overhead, but so does initializing and assigning a value to a variable. Obviously it would depend heavily on what the function is doing as well.
Generally this performance issue is apparent in loops, like for loops where you might do something like for ($i=0; $i < foo(); $i++) and it'll be run thousands of times.
However in your case of just a handful of times, I would personally say - use a variable, because from a maintenance perspective - it will be easier to modify. Performance wise it won't matter either way.