I was wondering wether it makes a difference in speed to save PHP SESSION Variables at the top of a script as Variables or just use the SESSION Variables through the entire script. e.g.
$_SESSION['bar'];
...
<p><?php echo $_SESSION['bar'] ?></p>
<p><?php echo $_SESSION['bar'][0] ?></p>
Or as explained above: Save the SESSION Variable first and then access that variable instead.
$bar = $_SESSION['bar'];
...
<p><?php echo $bar ?></p>
<p><?php echo $bar[0] ?></p>
Does it make any difference? Is PHP Requesting the SESSION Variables every single time from the server again?