1. Go to this page and download the library: Download wmde/iterable-functions 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/ */
wmde / iterable-functions example snippets
function doStuff(iterable $iterable) {
$iterableMinusFooBar = array_diff( $iterable, [ 'foo', 'bar' ] );
}
// Output: array_diff(): Argument #1 is not an array