Re: foreach() for strings
| From: | Stas Malyshev | Date: | Mon, 20 Jun 2011 16:31:43 +0000 |
| Subject: | Re: foreach() for strings | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-53423@lists.php.net to get a copy of this message | ||
Hi!
foreach() has many functions, looping over arrays, objects and implementing the iterator interface. I think it's also quite intuitive to use foreach() for strings, too.I'm not sure how you'd implement such thing, but then I think things like next(), end(), etc. should work too... -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227