Skip to content

Instantly share code, notes, and snippets.

@erikfig
Created November 5, 2019 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikfig/121371775e68ada25aaf1ba468ac76d6 to your computer and use it in GitHub Desktop.
Save erikfig/121371775e68ada25aaf1ba468ac76d6 to your computer and use it in GitHub Desktop.
<?php
$data = scandir(__DIR__);
foreach ($data as $sub) {
if (is_dir(__DIR__ . DIRECTORY_SEPARATOR . $sub)) {
echo $sub . ' is a dir';
if (preg_match('/[0-9]{3}/', $sub)) {
echo ' and is a bank code';
}
echo PHP_EOL;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment