In Windows 7, running php.exe from C:\wamp64\bin\php\php5.6.25\php.exe
,
I find that the following prints the PHP usage instructions.
echo 4;|php -r
<-- prints php usage instructions
C:\wamp64\bin\php\php5.6.25>echo 4;|php -r
Usage: php [options] [-f] <file> [--] [args...]
php [options] -r <code> [--] [args...]
However, a friend claims that the same command echo 4;|php -r
(or perhaps he means echo '4;'|php -r
works for him using Linux.
How can I get this behaviour in windows?
Note I'm aware of php -r used to run some code passed as a parameter following it, i'm asking about it running a file or accepting stdin.