MacOS – Terminal could not find command ā€œ$ php -vā€

command linemacosPHPterminal

I recently try to install ionCube loader and when I tried to check my PHP version via Terminal, it gave me an -bash: $: command not found.

How can I fixed that?

Best Answer

The $ is just an example for the shell prompt in whatever instruction guide you are reading (used to indicate that you should run the command from your standard user account. A # would indicate that you should run the command as an admin/root user). Just run

php -v

instead.