The difference is in which environment you should use them. php://stdin, php://stdoutand are php://stderrmapped directly to the corresponding POSIX file streams and are intended for use with the SAPI CLI. On the other hand, php://output php://inputthey php://outputare intended for use with SAPI websites.
Try running these two commands from the command line:
printf "foo" | php -r "var_dump(file_get_contents('php://stdin'));"
printf "foo" | php -r "var_dump(file_get_contents('php://input'));"
You will get the result as follows:
Command line code:1:
string(3) "foo"
Command line code:1:
string(0) ""
php://input , -SAPI, CGI mod_php, STDIN, . , POST ( php://input) php://stdin .
php://output , , echo . php://stdout , echo.
php://stderr , , , , .