title: Map a PHP array with another array
body: <p>I would like to map PHP array values with another map. I mean something like this:</p>
  <pre><code>&lt;?php
  
    function as_function($array) {
      return fn ($x) =&gt; $array[$x];
    }
  
    $x = array('a', 'b');
    $y = array('a' =&gt; 3, 'b' =&gt; 5, 'c' =&gt; 7);
  
    print_r(array_map(as_function($y), $x));
  </code></pre>
  <p>This code finishes with an expected result:</p>
  <pre><code>Array
  (
      [0] =&gt; 3
      [1] =&gt; 5
  )
  </code></pre>
  <p>I wonder if there is some smarter way to do it by replacing <code>array_map(as_function</code> with some PHP builtin function?</p>