note 125994 added to function.glob
| From: | Philo at main dot php dot net | Date: | Fri, 09 Apr 2021 11:08:05 +0000 |
| Subject: | note 125994 added to function.glob | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216265@lists.php.net to get a copy of this message | ||
It is also possible to nest alternations like this:
<?php
foreach (glob("{$dir}/*.{[jJ][pP]{,[eE]}[gG],[tT][iI][fF]{,[fF]}}", GLOB_BRACE) as $file)
{
// finds both .jp(e)g and .tif(f) files
// please note that you should double-check the file type, though
}
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 88.125.138.9)
----
Manual Page -- https://php.net/manual/en/function.glob.php
Edit -- https://main.php.net/note/edit/125994
Del: integrated -- https://main.php.net/note/delete/125994/integrated
Del: useless -- https://main.php.net/note/delete/125994/useless
Del: bad code -- https://main.php.net/note/delete/125994/bad+code
Del: spam -- https://main.php.net/note/delete/125994/spam
Del: non-english -- https://main.php.net/note/delete/125994/non-english
Del: in docs -- https://main.php.net/note/delete/125994/in+docs
Del: other reasons-- https://main.php.net/note/delete/125994
Reject -- https://main.php.net/note/reject/125994
Search -- https://main.php.net/manage/user-notes.php