News:

Build a stunning handcrafted website with IT Acumens

Main Menu

SPL in PHP

Started by thiruvasagamani, Jul 17, 2008, 05:18 PM

Previous topic - Next topic

thiruvasagamani

What is SPL.

SPL provides a standard set of interfaces for PHP5. The aim of SPL is to implement some efficient data access interfaces and classes for PHP. Functionally it is designed to traverse aggregate structures (anything you want to loop over). These may include arrays, database result sets, xml trees, directory listings or any list at all. Currently SPL deals with Iterators. To see all the classes available to SPL, this simple snippet will show you.

// a simple foreach() to traverse the SPL class names
foreach(spl_classes() as $key=>$value)
        {
        echo $key.' -> '.$value.'
';
        }
?>
Thiruvasakamani Karnan