Interactive shell using PHP
问题 Just wondering, is it possible to create an interactive shell, using PHP alone. I mean something like you have with databases, python, etc. If it is, how? 回答1: Yes, it's possible. In order to be interactive, the program must be able to wait for and read in user input from stdin . In PHP, you can read from stdin by opening a file descriptor to 'php://stdin'. Taken from an answer to different question, here's an example of an interactive user prompt in PHP (when run from the command line, of