<?php $file = file_get_contents("php://stdin", "r"); echo $file; ?>
echo -e "ndatan" | php script.php | cat
<?php $input_stream = fopen("php://stdin","r"); $text=""; while($line = fgets($input_stream,4096)){ $text .= $line; } fclose($input_stream); print($text); ?>