How to read user or console input in PHP?

In PHP, the console is a command-line interface, which is also called an interactive shell. We can access it by typing the following command in a terminal:

PHP -a

If we type any PHP code in the shell and hit enter, it is executed directly and displays the output or shows the error messages in case of any error. A sample run of a PHP code, that reads input from the…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
React Dojo

React Dojo

JS | React | PHP and other programming languages tips and tricks. Everything about Webdev and Devlife. Linkedin: https://bit.ly/3cjTaV5