Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$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