public function dataAvailable($timeout = 0)
    {
        $readFds = [$this->_input];
        $writeFds = null;
        $errorFds = null;
        $readyFds = stream_select($readFds, $writeFds, $errorFds, $timeout);

        return ($readyFds > 0);
    }
public function dataAvailable($timeout = 0)
    {
        $readFds = [$this->_input];
        $writeFds = null;
        $errorFds = null;
        $readyFds = stream_select($readFds, $writeFds, $errorFds, $timeout);

        return ($readyFds > 0);
    }
public function dataAvailable ( $ timeout = 0 ) { $ readFds = [ $ this -> _input ] ; $ writeFds = null ; $ errorFds = null ; $ readyFds = stream_select ( $ readFds , $ writeFds , $ errorFds , $ timeout ) ; return ( $ readyFds > 0 ) ; }
Check if data is available on stdin

@param int $timeout An optional time to wait for data
@return bool True for data available, false otherwise
Check if data is available on stdin