Skip to content

Instantly share code, notes, and snippets.

View JakubOnderka's full-sized avatar

Jakub Onderka JakubOnderka

View GitHub Profile
<?php
function nonBlockingReadLineFromStdIn()
{
$read = array(STDIN);
$write = array();
$except = array();
var_dump('Before stream select.');
$result = stream_select($read, $write, $except, 0);
var_dump('After stream select.', $result);