readline_add_history

(PHP 4, PHP 5, PHP 7, PHP 8)

readline_add_historyAgrega una línea a la historia

Descripción

readline_add_history(string $line): bool

Esta función agrega una línea a la historia de la línea de comandos.

Parámetros

line

La línea a ser agregada en la historia.

Valores devueltos

Devuelve true en caso de éxito o false en caso de error.

add a note

User Contributed Notes 1 note

up
-8
Anonymous
13 years ago
Note that readline_add_history() will add empty strings too.

<?php
$line
= readline(">>> ");
if (!empty(
$line)) {
readline_add_history($line);
}
?>
To Top