PHP code example of aklump / glob

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

    

aklump / glob example snippets


$matched_paths = \AKlump\Glob\Glob::glob('/foo/**/*.txt');

$glob = new \AKlump\Glob\Glob();
$matched_paths = $glob('/foo/**/*.txt');
// This second call will rely on the internal cache of $glob and is theoretically faster.
$matched_paths = $glob('/foo/**/*.md');