Can I receive input from both a pipe, and a heredoc, and use them both from within php on the command line.
I want to do something like this:
bash$ ls -l | php <<'code'
<?php
echo $piped;
?>
code
Which should return the result of ls -l
Also, can I use php -R with heredoc input for php script?
Piping
ls -l | php -r 'print_r(file("php://stdin"));'Heredoc
Combined
Note: When you use Here Documents for
phpcommand the newly addedphpcodes overrides the previousstdin