On 29.03.2020 at 21:05, Manuel Canga wrote: > Maybe, PHP needs array_flatten like Ruby: > https://apidock.com/ruby/Array/flatten > > In this way, above code would be equal to: > > $res = array_flatten( array_map('make_res', $arr) );
You can already do
$res = array_merge(...array_map('make_res', $arr));
:)
--
Christoph M. Becker
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
