$path = "/path/to/new/directory"; if (!file_exists($path)) { mkdir($path, 0777, true); }In this example, we first define a new directory path. We then check if the directory already exists using the `file_exists` function. If the directory does not exist, we call the `mkdir` function with the path, permissions (0777 means anyone can read, write, and execute the directory), and `true` parameter to create any necessary parent directories. The makeFolder function is part of the Filesystem API in PHP, which is included in the standard PHP library.