PHP code example of ebanx / stream

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

    

ebanx / stream example snippets


use EBANX\Stream\Stream;

$result = Stream::rangeInt(0, 10)
    ->map(function (int $value): int {
        return $value ** 2;
    })
    ->filter(function (int $value): bool {
        return $value % 2 === 0;
    })
    ->collect();

composer