Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #13750
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: ArrayAccess interface, Traversable interface and foreach |
| Date | 2014-05-23 16:35 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <llobf4$sme$1@dont-email.me> (permalink) |
| References | <fdd1f0af-6cbf-4577-a4c4-7c9073eae483@googlegroups.com> |
On 5/23/2014 2:22 PM, kurtk@pobox.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@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ArrayAccess interface, Traversable interface and foreach "kurtk@pobox.com" <kurtk@pobox.com> - 2014-05-23 11:22 -0700
Re: ArrayAccess interface, Traversable interface and foreach Jerry Stuckle <jstucklex@attglobal.net> - 2014-05-23 16:35 -0400
Re: ArrayAccess interface, Traversable interface and foreach Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-24 12:05 +0200
Re: ArrayAccess interface, Traversable interface and foreach Jerry Stuckle <jstucklex@attglobal.net> - 2014-05-24 07:09 -0400
Re: ArrayAccess interface, Traversable interface and foreach Christoph Michael Becker <cmbecker69@arcor.de> - 2014-05-24 14:37 +0200
Re: ArrayAccess interface, Traversable interface and foreach Adam Harvey <usenet@adamharvey.name> - 2014-05-27 18:59 +0000
Re: ArrayAccess interface, Traversable interface and foreach "kurtk@pobox.com" <kurtk@pobox.com> - 2014-06-02 07:15 -0700
csiph-web