original_string: public static function mkdirs($dir, $mode = 0777, $recursive = true)
      {
          if (($dir === null) || $dir === '') {
              return false;
          }
          if (is_dir($dir) || $dir === '/') {
              return true;
          }
          if (self::mkdirs(dirname($dir), $mode, $recursive)) {
              return mkdir($dir, $mode);
          }
          return false;
      }
code: public static function mkdirs($dir, $mode = 0777, $recursive = true)
      {
          if (($dir === null) || $dir === '') {
              return false;
          }
          if (is_dir($dir) || $dir === '/') {
              return true;
          }
          if (self::mkdirs(dirname($dir), $mode, $recursive)) {
              return mkdir($dir, $mode);
          }
          return false;
      }
code_tokens: public static function mkdirs ( $ dir , $ mode = 0777 , $ recursive = true ) { if ( ( $ dir === null ) || $ dir === '' ) { return false ; } if ( is_dir ( $ dir ) || $ dir === '/' ) { return true ; } if ( self :: mkdirs ( dirname ( $ dir ) , $ mode , $ recursive ) ) { return mkdir ( $ dir , $ mode ) ; } return false ; }
docstring: Utility function to recursive directory creation
  
  @param  string  $dir
  @param  integer $mode
  @param  boolean $recursive
  @return boolean
docstring_tokens: Utility function to recursive directory creation