I want to check if the user has install angular cli with running ng --version on PHP with exec, proc_open or shell_exec but return is empty. I dont have problems if I execute in cmd or in terminal's Visual Studio Code in any path on Windows.
I'm use wampserver
There are multiple ways to do it, and you have to consider what you will do if there are more than one found. You can find it:
And then if you really need the version, use the first one if it starts with
C:\:If it isn't found then
$paths[0]should contain: