-1

When I run PHP in my console (any cli application) and I sending a command like below, it not returned anything!

echo 'Hi!';

Is there any way to run PHP commands directly in console or just we can run a .php file?

Note: My environment variables and path is OK.

Amir
  • 1,328
  • 2
  • 13
  • 27

1 Answers1

3

You may use PHP's interactive shell

php -a
echo 'Hi!';
itsnothingg
  • 98
  • 1
  • 5