title: Blocking and non-blocking modes in PHP Streams
body: <p>I am studying for the PHP 5 Certification exam. This function was mentioned in the practice exams. </p>
  
  <p>function <a href="http://www.php.net/manual/en/function.stream-set-blocking.php">stream_set_blocking</a>():</p>
  
  <blockquote>
    <p>Sets blocking or non-blocking mode on
    a stream.</p>
    
    <p>This function works for any stream
    that supports non-blocking mode
    (currently, regular files and socket
    streams).</p>
  </blockquote>
  
  <p>From both a high-level and low-level perspective, how do blocking mode and non-blocking mode streams behave in PHP? What i a socket stream and a non-socket stream? Examples are appreciated.</p>