Home > PHP > Function > Readline > readline()

readline()

readline - Reads a line

Syntax

string readline (string $prompt)

Arguments

  • prompt - You may specify a string with which to prompt the user.

Description

Reads a single line from the user. You must add this line to the history yourself using readline_add_history().

Version

PHP 4, 5

Return value

Returns a single string from the user. The line returned has the ending newline removed.