This question is regarding dollar signs "$" $ in Windows PowerShell ISE.
I have PHP CLI and want to run one liner command scripts from the prompt in Windows PowerShell ISE.
php -r "$foo = 'foo';"
Just returns Parse error: parse error in Command line code on line 1 and I've narrowed it down to the pesky dollar sign which is significant in PowerShell. Can I escape it somehow?
I also tried
php -r '$foo = "foo";'
and get
Notice: Use of undefined constant foo - assumed 'foo' in Command line code on line 1