yii\helpers\BaseConsole::error PHP Метод

error() публичный статический Метод

Prints text to STDERR appended with a carriage return (PHP_EOL).
public static error ( string $string = null ) : integer | boolean
$string string the text to print
Результат integer | boolean number of bytes printed or false on error.
    public static function error($string = null)
    {
        return static::stderr($string . PHP_EOL);
    }

Usage Example

Пример #1
0
 /**
  * Prints text to STDERR appended with a carriage return (PHP_EOL).
  * @param  string          $string the text to print
  * @return integer|boolean number of bytes printed or false on error.
  */
 public static function error($string = null, $useEol = true)
 {
     return parent::error(self::renderColoredString("%r{$string}%n"), $useEol);
 }