Anonymous
public php v1 · immutable<?php//stdin.phperror_reporting(E_ALL);$context = stream_context_create(array());$fp = fopen('php://stdin', 'r', false, $context);stream_set_blocking($fp, 0);var_dump($fp);while (true) { $read = array($fp); if (false === ($num_changed_streams = @stream_select($read, $w=null, $e=null, 0))) { } elseif ($num_changed_streams > 0) { echo "."; echo fgets($fp); } usleep(100);}?>