code: protected static function getSysTempDir()
      {
          if ( function_exists( 'sys_get_temp_dir' ) )
          {
              return sys_get_temp_dir();
          }
          else if ( $tmp = getenv( 'TMP' ) )
          {
              return $tmp;
          }
          else if ( $tmp = getenv( 'TEMP' ) )
          {
              return $tmp;
          }
          else if ( $tmp = getenv( 'TMPDIR' ) )
          {
              return $tmp;
          }
          return '/tmp';
      }
docs: Returns the system temp directory.
  
  @return string