I have a question about the PHP `umask()` function and how it works. I'm relatively new to PHP and I'm trying to understand this function better. I have read the official documentation, but I still have a few questions.
In simple terms, what does the `umask()` function do? I know that it stands for "user file-creation mode mask", but I'm not entirely sure what that means. How does it affect file permissions?
Could someone provide me with a clear example of how to use the `umask()` function in PHP? I would appreciate it if you could break it down step by step and explain what each part does. Additionally, if there are any best practices or common use cases for using `umask()`, I would love to hear about them.
Thank you in advance for any help you can provide!