stderr() public method

You may optionally format the string with ANSI codes by passing additional parameters using the constants defined in [[\yii\helpers\Console]]. Example: $this->stderr('This will be red and underlined.', Console::FG_RED, Console::UNDERLINE);
public stderr ( string $string ) : integer | boolean
$string string the string to print
return integer | boolean Number of bytes printed or false on error
Example #1
0
 /**
  * If in daemon mode - no write to console
  *
  * @param string $string
  *
  * @return int
  */
 public function stderr($string)
 {
     if (!$this->demonize && is_resource(\STDERR)) {
         return parent::stderr($string);
     } else {
         return false;
     }
 }