Terminal in php

How to implement something similar to the terminal, i.e. you enter, log in, then you just send commands, for example, echo myname– the name is displayed in the profile or just plain text from the database; only the database in the text file will be, for example, echo 1– the text is output from the database.

Answer 1, authority 100%

You don’t need to write anything. All done. For example, PHP Shell. If you need to execute some special commands, then you can parse and execute. Maybe with eval.