[eluser]Chris Newton[/eluser]
Code:
private function _mkdir_recursive($pathname, $mode=0777)
{
is_dir(dirname($pathname)) || $this->_mkdir_recursive(dirname($pathname), $mode);
return is_dir($pathname) || mkdir($pathname, $mode,TRUE);
}
Recursive functions always have my brain in a twist, and this one uses some obscure form of PHP syntax that I'm just not getting. Can anyone please take a moment and write this out in long PHP, or at least direct me to the PHP documentation that explains how this syntax works. Every time I try to make sense of it using standard if/else statements it just doesn't seem to get to the point that it works or makes sense to me.
I know the code WILL work to create folders, but I'd prefer to understand HOW. I just keep staring at it, and the code doesn't make any sense to me. Any help would be greatly appreciated.