When I open a terminal window (bash shell) and hit Up Arrow, the last command entered is presented.
When running a simple PHP script in the same terminal window, and the script reads from STDIN using fgets, and I hit Up Arrow, then the characters ^[[A are presented.
How to make the PHP script behave like the bash shell prompt, and present the last input?
0 Answers