How to Read from stdin in PHP Posted in Polyglotbits on 19 of Aug, 2015

Reading from stdin in PHP is just like reading a file. The only difference is that the file to read is called php://stdin

<?php
echo file_get_contents('php://stdin');