Re: Am I supposed to be using SPL?

From: Date: Thu, 01 Jun 2006 20:42:22 +0000
Subject: Re: Am I supposed to be using SPL?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-237215@lists.php.net to get a copy of this message
On Thu, June 1, 2006 3:52 am, Kevin Waterson wrote: > This one time, at band camp, "D. Dante Lorenso" <dante@vocalspace.com> > wrote: > >> Is SPL meant to be used? If so, is it experimental? Is it >> documented? >> Should I stay away from SPL for production code? What's the >> official word? > > Officially SPL is part of PHP. It provides a standard interface for > iterating over > aggregate objects, eg: array, directory listing, xml, etc... > > try{ > foreach ( new DirectoryIterator('./') as $Item ) > { > echo $Item.'<br />'; > } > } > > catch(Exception $e){ > echo 'No files Found!<br />'; > } So, of all the things that COULD go wrong, we just assume it's "No files Found"??? I don't think I'll ever learn to like SPL or try/catch... :-) -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#237215) next »