Using arraymap on all elements of a multidimensional array

Code
<?php

$a 
= function($b) use (&$a) {
    if (
is_array($b)) {
        
$r array_map($a$b);
    }
    else {
        
$r $b 100;
    }
    
    return 
$r;
};

$b range(110);
$b[] = range(1113);

echo 
'<pre>';
dump(array_map($a$b));
echo 
'</pre>';
Result
^ array:11 [
  0 => 101
  1 => 102
  2 => 103
  3 => 104
  4 => 105
  5 => 106
  6 => 107
  7 => 108
  8 => 109
  9 => 110
  10 => array:3 [
    0 => 111
    1 => 112
    2 => 113
  ]
]
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8