← All built-ins / readline()
readline()
readline(string $s): string
Parameters
| Name | Type | Description |
|---|---|---|
| $prompt | string | text shown before reading |
Return value
One line from stdin (for interactive scripts).
Example
echo "readline reads one stdin line";
readline reads one stdin line
This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.