note 127429 added to function.readline
| From: | mfuhrmanatenetarchdotnet at main dot php dot net | Date: | Sat, 06 Aug 2022 16:39:05 +0000 |
| Subject: | note 127429 added to function.readline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219379@lists.php.net to get a copy of this message | ||
<?
/*
*
I've noticed strange behavior from readline while using it for user input from a CLI.
When I press multiple tabs it prints a scandir to the input stream.
Below is the code:
*
*/
$msg = "";
while ($msg != "quit")
{
while (($msg == "") || ($msg == "\r"))
$msg = readline ("> ");
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 185.85.3.173 (proxied: 199.188.195.162)
----
Manual Page -- https://php.net/manual/en/function.readline.php
Edit -- https://main.php.net/note/edit/127429
Del: integrated -- https://main.php.net/note/delete/127429/integrated
Del: useless -- https://main.php.net/note/delete/127429/useless
Del: bad code -- https://main.php.net/note/delete/127429/bad+code
Del: spam -- https://main.php.net/note/delete/127429/spam
Del: non-english -- https://main.php.net/note/delete/127429/non-english
Del: in docs -- https://main.php.net/note/delete/127429/in+docs
Del: other reasons-- https://main.php.net/note/delete/127429
Reject -- https://main.php.net/note/reject/127429
Search -- https://main.php.net/manage/user-notes.php