Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConsoleOutput.php

function ConsoleOutput::openErrorStream

Return value

resource

1 call to ConsoleOutput::openErrorStream()
ConsoleOutput::__construct in vendor/symfony/console/Output/ConsoleOutput.php

File

vendor/symfony/console/Output/ConsoleOutput.php, line 144

Class

ConsoleOutput
ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR.

Namespace

Symfony\Component\Console\Output

Code

private function openErrorStream() {
    if (!$this->hasStderrSupport()) {
        return fopen('php://output', 'w');
    }
    // Use STDERR when possible to prevent from opening too many file descriptors
    return \defined('STDERR') ? \STDERR : (@fopen('php://stderr', 'w') ?: fopen('php://output', 'w'));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal