PHP code example of ilya / belt

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

    

ilya / belt example snippets



use Belt\Belt;

Belt::max([1, 2, 3]) // => 3

Belt::flatten([1, [2, [3]]]) // => [1, 2, 3]

Belt::last([1, 2, 3], 2) // => [2, 3]