What is the php's glob function starting point for pattern searching when given arguments like below.
$dirs = glob('*');
Does it resolve its path like many file handling functions.
What is the php's glob function starting point for pattern searching when given arguments like below.
$dirs = glob('*');
Does it resolve its path like many file handling functions.
The manual http://php.net/manual/en/function.glob.php states:
The glob() function searches for all the pathnames matching pattern according to the rules used by the libc glob() function, which is similar to the rules used by common shells.
and pulled from https://www.gnu.org/software/libc/manual/html_node/Calling-Glob.html and using "libc glob() function" as a starting reference, states:
The function glob does globbing using the pattern pattern in the current directory. It puts the result in a newly allocated vector, and stores the size and address of this vector into *vector-ptr. The argument flags is a combination of bit flags; see Flags for Globbing, for details of the flags.
Side note: The folks at PHP.net may have felt they didn't see the need to repeat those rules. Why? I don't know that and would be out of the scope of the question. It would however, have been nice for them to include a hyperlink as a reference (starting) point.
That will be the folder where your script is located. The function glob does globbing using the requested pattern in the current directory.