External Variables of Anonymous Functions in PHP

Anonymous functions, just like regular ones, cannot see variables declared outside the function:

php<?php
  $num1 = 1;
  $num2 = 2;
  
  $func = function()
  {
    echo $num1 + $num2; // error, variables are not accessible
  };
  
  $func();
?>
Задание 1

Explain what the result of executing the code will be:

php<?php
  $num = 5;
  
  $func = function()
  {
    return $num ** 2;
  };
  
  echo $func();
?>