private static function fetchDimensions()
    {
        if (DIRECTORY_SEPARATOR === '\\') {
            $dimensions = static::getAnsiCon();
            if (!$dimensions) {
                $dimensions = static::getConsoleMode();
            }
        } else {
            $dimensions = static::getSttyColumns();
        }

        // Default, if above methods fail.
        $dimensions += [80, 50];

        static::$width = $dimensions[0];
        static::$height = $dimensions[1];

        // Reset signal handler flag.
        static::$pcntlNeedsUpdate = false;
    }