self::TITLE, "description" => << 1, "help" => "spécifier le nombre d'étapes", ], ["-n", "--no-install-signal-handler", "value" => false, "help" => "ne pas installer le gestionnaire de signaux", ], ]; protected $count = 100; protected bool $installSignalHandler = true; function main() { if ($this->installSignalHandler) app2::install_signal_handler(); $count = intval($this->count); msg::info("Starting train for ".words::q($count, "step#s")); app2::action("Running train...", $count); for ($i = 1; $i <= $count; $i++) { msg::print("Tchou-tchou! x $i"); app2::step(); sleep(1); } msg::info("Stopping train at ".new DateTime()); } }