On 28/06/12 23:45, Sebastian Krebs wrote:
> Hi,
>
> 2012/6/28 David Muir <davidkm...@gmail.com>
>
>> I'd assume that array_map() only works with arrays, while list
>> comprehension should work with anything traversable.
>>
> That sounds more like a "bug" (better: "Missing feature") in array_map()
> and less a missing language feature...

All the array_* functions only work with arrays, and don't allow
objects, even ones implementing ArrayAccess.

It's been there as a feature request since 2007:
https://bugs.php.net/bug.php?id=43650

Cheers,
David

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to