Arbitrary Arrays in PHP

Multidimensional arrays do not necessarily have to be like the ones we considered above. Take a look, for example, at the following array:

php<?php
  $arr = [['a', 'b', [1, 2, 3], [4, 5]], ['d', ['e', 'f']]];
?>

If we rewrite it in a more understandable form, we will see that this array is "irregular". In it, arrays are located next to ordinary elements:

php<?php
  $arr = [
    [
      'a', 'b', [1, 2, 3], [4, 5],
    ],
    [
      'd', ['e', 'f'],
    ],
  ];
?>
Задание 1

Given the following array:

php<?php
  $arr = [[1, 2, 3, [4, 5, [6, 7]]], [8, [9, 10]]];
?>

Find the sum of all elements of the given array. Access each element individually, without a loop.