PHP code example of wnowicki / collections

1. Go to this page and download the library: Download wnowicki/collections library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wnowicki / collections example snippets


$collection = ObjectCollection::make('\Fruit');

$collection->add(new Apple())
    ->add(new Orange())
    ->add(new Apple());
bash
curl -sS https://getcomposer.org/installer | php
bash
php composer.phar