How to use PHP mkdir function recursively to skip existing directory and to create new one from the string $pathname
// works fine if directories don't exist
mkdir($root_dir . '/demo/test/one', 0775, true);
// It will throw error - Message: mkdir(): File exists
mkdir($root_dir . '/demo/test/two', 0775, true);
What is the solution?