Why talk about references in PHP? Because most coders of PHP would not be able to correctly predict the output of this program. Will this terminate or run forever? $orig_array = [4,5,6]; foreach ($orig_array as $elem) {
$orig_array[] = $elem + 1;
echo $elem;
} or, reason about the output…