What is the correct syntax for using the mkdir function in PHP to create a new directory?

To create a new directory in PHP, you can use the mkdir function. The correct syntax for using the mkdir function is as follows: mkdir('path/to/directory', optional_permissions, optional_recursive). The first parameter specifies the path to the directory you want to create, the second parameter specifies the permissions for the directory (optional), and the third parameter specifies whether to create parent directories if they do not exist (optional).

// Creating a new directory named 'new_directory'
mkdir('path/to/new_directory', 0777, true);