I'm running a php script in my terminal, here's the code :
php -S localhost:8080 script.php
To echo a data, I have to open a web browser with the url localhost:8080 and wait for the script to finish.
I want to know if it is possible to log data into the terminal instead of the web browser? And also, if it is possible to log the data live and not to wait for the script to finish.
Supposing you are running in a Linux Console: php -f /path/to/file/script.php
should do the trick.