readline_add_history

(PHP 4, PHP 5, PHP 7)

readline_add_historyDodaje wiersz do historii

Opis

readline_add_history ( string $wiersz ) : bool

Funkcja ta dodaje wiersz do historii wiersza poleceń.

Parametry

wiersz

Wiersz, który zostanie dodany do historii.

Zwracane wartości

Zwraca TRUE w przypadku powodzenia, FALSE w przypadku błędu.

add a note add a note

User Contributed Notes 1 note

up
-6
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