diff --git a/bin/phulp.php b/bin/phulp.php index d4b740f..ad8af4d 100644 --- a/bin/phulp.php +++ b/bin/phulp.php @@ -142,7 +142,16 @@ } } -$phulpFiles = glob('[P,p]hulp[Ff]il{e,e.php}', GLOB_BRACE); +if (defined('GLOB_BRACE')) { + $phulpFiles = glob('[P,p]hulp[Ff]il{e,e.php}', GLOB_BRACE); +} else { + $phulpFiles = []; + $finder = \Symfony\Component\Finder\FindeR::create() + ->name('~^phulpfile(\.php)*$~i')->depth('< 1')->in(getcwd()); + foreach ($finder->getIterator() as $file) { + $phulpFiles[] = $file->getFilename(); + } +} if (count($phulpFiles) > 1) { $out::err(sprintf(