umask
Changes the current umask
Description
intumask
intmask
umask sets PHP's umask to
mask & 0777 and returns the old
umask. When PHP is being used as a server module, the umask
is restored when each request is finished.
umask without arguments simply returns the
current umask.
Avoid using this function in multithreaded webservers. Better change the file
permissions with chmod after creating the file. Using
umask can lead to unexspected behavior of concurrently
running scripts and the webserver itsself because they all use the same umask.