Changing Function Parameters in PHP

Changing variables passed as parameters to a function will not lead to changes in these variables outside:

php<?php
  function func($bbb)
  {
    $bbb = 2;
  }
  
  $aaa = 1;
  func($aaa);
  echo $aaa; // 1
?>

This, of course, works even if the external and internal variables have the same name:

php<?php
  function func($num)
  {
    $num = 2;
  }
  
  $num = 1;
  func($num);
  echo $num; // 1
?>
Задание 1

Tell me what the result of the code execution will be:

php<?php
  $aaa = 'a';
  
  function func($bbb)
  {
    $bbb = 'b';
  }
  
  func($aaa);
  echo $aaa;
?>
Задание 2

Tell me what the result of the code execution will be:

php<?php
  $aaa = 'a';
  
  function func($bbb)
  {
    $bbb = 'b';
  }
  
  func($aaa);
  echo $bbb;
?>
Задание 3

Tell me what the result of the code execution will be:

php<?php
  $str = 'a';
  
  function func($str)
  {
    $str = 'b';
  }
  
  func($str);
  echo $str;
?>
Задание 4

Tell me what the result of the code execution will be:

php<?php
  $arr = [1, 2, 3, 4, 5];
  
  function func($arr)
  {
    $arr[0] = '!';
  }
  
  func($arr);
  var_dump($arr);
?>