Re: Am I supposed to be using SPL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This one time, at band camp, "D. Dante Lorenso" <dante@xxxxxxxxxxxxxx> 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 />'; 
}

Kevin

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux