php_uname example


        static $sysmap = array(
            'HP-UX' => 'hpux',
            'IRIX64' => 'irix',
        );
        static $cpumap = array(
            'i586' => 'i386',
            'i686' => 'i386',
            'ppc' => 'powerpc',
        );
        if ($uname === null) {
            $uname = php_uname();
        }
        $parts = preg_split('/\s+/', trim($uname));
        $n = count($parts);

        $release  = $machine = $cpu = '';
        $sysname  = $parts[0];
        $nodename = $parts[1];
        $cpu      = $parts[$n-1];
        $extra = '';
        if ($cpu == 'unknown') {
            $cpu = $parts[$n - 2];
        }

    protected function serverHostname()
    {
        $result = '';
        if (!empty($this->Hostname)) {
            $result = $this->Hostname;
        } elseif (isset($_SERVER) && array_key_exists('SERVER_NAME', $_SERVER)) {
            $result = $_SERVER['SERVER_NAME'];
        } elseif (function_exists('gethostname') && gethostname() !== false) {
            $result = gethostname();
        } elseif (php_uname('n') !== false) {
            $result = php_uname('n');
        }
        if (!static::isValidHost($result)) {
            return 'localhost.localdomain';
        }

        return $result;
    }

    /** * Validate whether a string contains a valid value to use as a hostname or IP address. * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`. * * @param string $host The host name or IP address to check * * @return bool */

        return false === $this->isRunningOS400();
    }

    /** * Checks if current executing environment is IBM iSeries (OS400), which * doesn't properly convert character-encodings between ASCII to EBCDIC. */
    private function isRunningOS400(): bool
    {
        $checks = [
            \function_exists('php_uname') ? php_uname('s') : '',
            getenv('OSTYPE'),
            \PHP_OS,
        ];

        return false !== stripos(implode(';', $checks), 'OS400');
    }

    /** * @return resource */
    private function openOutputStream()
    {
  // Description :   // Translate windows path by replacing '\' by '/' and optionally removing   // drive letter.   // Parameters :   // $p_path : path to translate.   // $p_remove_disk_letter : true | false   // Return Values :   // The path translated.   // --------------------------------------------------------------------------------   function PclZipUtilTranslateWinPath($p_path$p_remove_disk_letter=true)
  {
    if (stristr(php_uname(), 'windows')) {
      // ----- Look for potential disk letter       if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
          $p_path = substr($p_path$v_position+1);
      }
      // ----- Change potential windows directory separator       if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
          $p_path = strtr($p_path, '\\', '/');
      }
    }
    return $p_path;
  }
  

        return false === $this->isRunningOS400();
    }

    /** * Checks if current executing environment is IBM iSeries (OS400), which * doesn't properly convert character-encodings between ASCII to EBCDIC. */
    private function isRunningOS400(): bool
    {
        $checks = [
            \function_exists('php_uname') ? php_uname('s') : '',
            getenv('OSTYPE'),
            \PHP_OS,
        ];

        return false !== stripos(implode(';', $checks), 'OS400');
    }

    /** * @return resource */
    private function openOutputStream()
    {
$gs_debug = 'unknown';
        }

        $info['wp-media']['fields']['ghostscript_version'] = array(
            'label' => __( 'Ghostscript version' ),
            'value' => $gs,
            'debug' => $gs_debug,
        );

        // Populate the server debug fields.         if ( function_exists( 'php_uname' ) ) {
            $server_architecture = sprintf( '%s %s %s', php_uname( 's' )php_uname( 'r' )php_uname( 'm' ) );
        } else {
            $server_architecture = 'unknown';
        }

        $php_version_debug = PHP_VERSION;
        // Whether PHP supports 64-bit.         $php64bit = ( PHP_INT_SIZE * 8 === 64 );

        $php_version = sprintf(
            '%s %s',
            $php_version_debug,
            (
if ($this->_recipients !== array()) {
            $recipient = array_rand($this->_recipients);
        } else {
            $recipient = 'unknown';
        }

        $hostName = $this->messageIdHostName;
        if (!$hostName) {
            $hostName = (string) ($_SERVER['SERVER_NAME'] ?? '');
        }
        if (!$hostName) {
            $hostName = php_uname('n');
        }

        return sha1($time . $user . $rand . $recipient) . '@' . $hostName;
    }

    /** * Add a custom header to the message * * @param string $name * @param string $value * @param boolean $append * @return Zend_Mail Provides fluent interface * @throws Zend_Mail_Exception on attempts to create standard headers */

    protected function _createUniqueId()
    {
        $id = '';
        $id .= function_exists('microtime') ? microtime(true) : (time() . ' ' . Shopware\Components\Random::getInteger(0, 100000));
        $id .= '.' . (function_exists('posix_getpid') ? posix_getpid() : Shopware\Components\Random::getInteger(50, 65535));
        $id .= '.' . php_uname('n');

        return $id;
    }

    /** * open a temporary maildir file * * makes sure tmp/ exists and create a file with a unique name * you should close the returned filehandle! * * @param string $folder name of current folder without leading . * @return array array('dirname' => dir of maildir folder, 'uniq' => unique id, 'filename' => name of create file * 'handle' => file opened for writing) * @throws Zend_Mail_Storage_Exception */
Home | Imprint | This part of the site doesn't use cookies.