I'm calling a PHP script from command line:
/usr/bin/php -r "require '/path/to/php/dummy.php'; echo getFunction(\"DummyParameter\")";
The call works like a charm, and the PHP function returns the correct value. I want to replace DummyParameter with a $ShellVariable. When I replace DummyParameter, it is supposed to be passed as "$ShellVariable" string. Here is what I have tried:
/usr/bin/php -r "require '/path/to/php/dummy.php'; echo getFunction(\"$ShellVariable\")";
Is there any way to pass the shell variable into the PHP script as a function argument?
Thanks in advance.