dear community,
in this php-one-liner i get a error
$ php -r "$foo = get_defined_constants();" Command line code(1) : Parse error - parse error, unexpected '='
guess: The problem here seems to have to do with the using of the double quotes
any idea?
I don't get any errors from what you've supplied.
Use single quotes, double quotes are interpretted by the command line, so its trying to replace $foo with nothing since its not defined, so you end up with php -r ' = get_defined_constants();'
I ran into that sort of thing recently, too. Not sure what I did, but it stopped happening after a bit -- I think it's when the command shell is in some particular state or other? (I didn't think to try changing to single quotes.)