Jordi Boggiano's Blog: Major glob() fail

Courtesy PHPDeveloper.org  Mon, 12/07/2009 - 13:50

Jordi Boggiano had the "pleasure" of discovering a small quirk with PHP's glob function in an application he was working on - watch out for directories that contain square braces, they won't return in the results!

Working on some personal project that lists a bunch of stuff on my hard drive, I found out that directories that contain square brackets (those []) don't return any results for the simple reason that glob reads [stuff] as a...


 

More related items

DevShed: Effects of Wrapping Code in Class Constructs
DevShed has a new tutorial posted today looking to help you counteract the bad practice of wrapping procedural code in "class" constructs and provide some useful suggestions of how to avoid...

ArrayAccess vs ArrayObject - Lorna Mitchell
I help people qualify for Zend Certification and in the last few months I've had questions about both ArrayAccess and ArrayObject. This post is an attempt to illuminate both. In very simple...

Proxies in PHP - Matthew Weier O'Phinney
A number of programming design patterns look very similar. One of these is the Proxy pattern, which, at first glance, can look like a number of others: Decorator, Flyweight, even plain old...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com