Bug #69628 [NEW]: glob() returns empty array on Windows 7, BUT not CentOS 6.7
From: russ at herballure dot com
Operating system: Windows 7 SP1 64-bit
PHP version: 5.6.8
Package: Filesystem function related
Bug Type: Bug
Bug description:glob() returns empty array on Windows 7, BUT not CentOS 6.7
Description:
------------
When using glob() on Win 7 64 PHP 5.6.8,
when using GLOB_BRACE with multiple brackets within the braces,
glob() returns an empty array even when files match.
This same function works as expected on PHP 5.3.10 on CentOS 6.7.
Test script:
---------------
$x = glob('D:\\Icons\\*.{[jJ][pP][gG],[gG][iI][fF]}', GLOB_BRACE);
var_dump($x);
/*
The target directory "D:\Icons\" contains these files:
image1.jpg
image2.GIF
image3.bmp
*/
Expected result:
----------------
array(2) {
[0]=> "D:\Icons\image1.jpg"
[1]=> "D:\Icons\image2.GIF
}
Actual result:
--------------
array(0) {
}
--
Edit bug report at https://bugs.php.net/bug.php?id=69628&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69628&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69628&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69628&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69628&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69628&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69628&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69628&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69628&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69628&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69628&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69628&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69628&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69628&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69628&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69628&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69628&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69628&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69628&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69628&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69628&r=mysqlcfg
Thread (4 messages)
- russ at herballure dot com