if (is_cli()) { // Readline is an extension for PHP that makes interactivity with PHP
// much more bash-like.
// http://www.php.net/manual/en/readline.installation.php
static::
$readline_support =
extension_loaded('readline'
);
// clear segments & options to keep testing clean
static::
$segments =
[];
static::
$options =
[];
// Check our stream resource for color support
static::
$isColored =
static::
hasColorSupport(STDOUT
);
static::
parseCommandLine();
static::
$initialized = true;
} elseif (!
defined('STDOUT'
)) { // If the command is being called from a controller
// we need to define STDOUT ourselves
// For "! defined('STDOUT')" see: https://github.com/codeigniter4/CodeIgniter4/issues/7047
define('STDOUT', 'php://output'
); // @codeCoverageIgnore
} }