[nycphp-talk] SPL - Do you use?
Jon Baer
jonbaer at jonbaer.com
Thu Sep 27 08:14:05 EDT 2007
Do many here use the SPL library?
I could never really understand this "library", on one side part of
the Java programming that I really felt to be a burden of added /
bloated code was the idea of the "Iterator" (you always had to grab
one) and that is pretty much what the SPL is (for PHP5), and part of
the joy to PHP was the ease + use of a foreach loop and then Java
took a step back and implemented the same foreach idea in current
JVMs but I barely see it used in many projects. I would guess that
Java people coming to PHP would understand it's uses / design pattern
better but the part of the Zend article I don't understand is ...
"This library of interfaces creates a standard API for certain kinds
of built-in functionality, allowing your classes to interact with the
PHP engine in a much more seamless manner."
Im just wondering if this means the use of saying "foreach($objects
as $object)" or does refactoring w/ PHP5 Iterators also get you
something else as well?
- Jon
References:
http://devzone.zend.com/article/2565-The-Standard-PHP-Library-SPL
http://us.php.net/spl
http://www.php.net/~helly/php/ext/spl/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070927/4eb719e4/attachment.html>
More information about the talk
mailing list