http://willem.stuursma.name/2010/11/22/a-detailed-look-into-array_map-and-foreach/ can be useful... Probably considering a container with a lot of files (I have almost 25000 entries in one of my containers on azure) is not so good to use the anonymous function...