/** * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput. */ public function __construct($output = null) { $this->decimalPoint = (string) 0.5; $this->decimalPoint = $this->decimalPoint[1]; $this->setOutput($output ?: static::$defaultOutput); if (!$output && is_string(static::$defaultOutput)) { static::$defaultOutput = $this->outputStream; } }
/** * * @param callable|resource|string|null $output * A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput. * @param string $charset * The default character encoding to use for non-UTF8 strings. */ public function __construct($output = null, $charset = null) { $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); $this->decimalPoint = (string) 0.5; $this->decimalPoint = $this->decimalPoint[1]; $this->setOutput($output ?: static::$defaultOutput); if (!$output && is_string(static::$defaultOutput)) { static::$defaultOutput = $this->outputStream; } }