Hi, Internals
> > Em sáb., 28 de mar. de 2020 às 20:07, Michael Voříšek - ČVUT FEL < > voris...@fel.cvut.cz> escreveu: > > > Hi all PHP gurus! > > > > This is a feature request / RFC for the following use-case: > > > > $res = []; > > foreach ($arr as $i) { > > foreach (make_res($i) as $v) { > > $res[] = $v; > > } > > } > > 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) ); Regards -- Manuel Canga -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php