Aside from readability, are there any pros/cons to either of the following examples. The first i will access the value using the array index each time i use it and the second example i will assign to a temporary varaiable and then just use the variable
$myArray = ['value_1' => 'value 1', 'value_2' => 'value 2', 'value_3' => 'value 3'];
$value1 = $myArray['value_1'];
// Do lots of things with $value1
Versus
$myArray = ['value_1' => 'value 1', 'value_2' => 'value 2', 'value_3' => 'value 3'];
// Do lots of things with $myArray['value1']