// Determine package library namespace MyApp\Utils; /** * Find or make a directory within a given directory * @param string $dir * @param string $subdir * @return string */ function findOrMake($dir, $subdir) { $targetDir = $dir . '/' . $subdir; if (is_dir($targetDir)) { return $targetDir; } if (mkdir($targetDir, 0777, true)) { return $targetDir; } return false; } $path = findOrMake('/path/to/dir', 'new-folder'); echo $path; // /path/to/dir/new-folderIn this example, the `findOrMake` function is defined within the `MyApp\Utils` namespace and takes two parameters, `$dir` and `$subdir`. The function concatenates the `$dir` and `$subdir` parameters to create a target directory path, and checks if it exists using the `is_dir` function. If the directory doesn't exist, the function attempts to create it using the `mkdir` function. If successful, the function returns the full target directory path. If not successful, it returns false. The package library of the `findOrMake` function is not specified in the example, but it is likely part of a larger file or directory management utility library.