PHP code example of appertly / hcollection

1. Go to this page and download the library: Download appertly/hcollection 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/ */

    

appertly / hcollection example snippets


use HH\ImmMap;
use HH\ImmVector;

$map = ImmMap::of(); // would be empty
$vector = ImmVector::of(); // would be empty
$map = ImmMap::of('key1', 'value1', 'key2', 'value2', 'key3'); // value3 would be null
$vector = ImmVector::of(1, 2, 3);