FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » ArrayAccess interface, Traversable interface and foreach
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ArrayAccess interface, Traversable interface and foreach [message #185988 is a reply to message #185987] Fri, 23 May 2014 20:35 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 5/23/2014 2:22 PM, kurtk(at)pobox(dot)com wrote:
> The documentation for ArrayAccess (at http://www.php.net/manual/en/class.arrayaccess.php) doesn't show it implementing Traversable. Nevertheless, you can still use any class you write that implements ArrayAccess in a foreach loop.
>
> This seems like an oversight in the documentation--unless I am missing something?
>

Not an oversight, IMHO. I think it's impossible for the document
writers to cover *every* possible usage.

That's why there are usage notes, contributed by users like yourself,
who have found other usages which are valuable (or do not work).

You can always add your own note to the documentation to show how it's
done; in fact I would encourage it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: mysqli fetch_assoc() straight to array
Next Topic: Pthread with amazon sns
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun May 19 00:36:04 GMT 2024

Total time taken to generate the page: 0.04995 seconds