I was trying to add globstar to php, but suddenly I stumbled on this weird behavior:
$ php --version
PHP 5.4.15-1~dotdeb.1 (cli) (built: May 11 2013 19:59:55)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
$ ls -p
1/ f1
$ echo *
1 f1
$ php -r 'print_r(glob("*"));'
Array
(
[0] => 1
[1] => f1
)
$ echo */
1/
$ php -r 'print_r(glob("*/"));'
Array
(
[0] => 1/
)
$ echo ./*/
./1/
$ php -r 'print_r(glob("./*/"));'
Array
(
[0] => ./1/
[1] => ./f1
)
Is this a bug?