<?php
$foo = file_get_contents('php://stdin', "r");
$foo = preg_replace( '/\h+/', ' ', $foo );
echo $foo;
?>