title: How can I use the array_map with callback function as a member of array element?
body: <p>Can I use array_map to replace this code:</p>
  
  <pre><code>$points = [];
  foreach($addresses as $address) $points[] = $address-&gt;getRoutePoint();
  $this-&gt;points = $points;
  </code></pre>