php://output¶
php://output is a special write-only stream that gives access the body of the outgoing HTTP response. It does not work with CLI environment.
php://output is also implicitly written when using echo, print, the HTML mode, or print_r().
<?php
$incoming = file_put_contents('php://output', '<p>hello world</p>');
?>
See also PHP Output Buffering for dummies.
Related : Hyper Text Transfer Protocol (HTTP), Stream, Echo, Print, php://input, file_put_contents(), $HTTP_RAW_POST_DATA