PHP code example of aeris / fn

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

    

aeris / fn example snippets


	Fn\pluck([
			['name' => 'moe', 'age' => 45],
			['name' => 'larry', 'age' => 55],
			['name' => 'curly', 'age' => 65]
		], 'name');
  // --> ['moe', 'larry', 'curly']

    Fn\concat(['a', 'b'], 'c');  				  // ['a', 'b', 'c']
    Fn\concat(['a', 'b'], ['c', 'd']);  	// ['a', 'b', 'c', 'd']

Fn\any([1, 3, 4, 5, 9], Fn\even()) // true
Fn\any([1, 3, 5, 9], Fn\even()) // false

Fn\all([1, 3, 5, 9], Fn\odd()) // true
Fn\all([1, 3, 4, 5, 9], Fn\even()) // false

Fn\times(3, function($i) {
	echo "call #$i";
})

// call 1
// call 2
// call 3