title: socket_read() not blocking
body: <p>Trying to get my socket_read() to block when the data has already been read before.
  I need it to wait for the $spawn socket to have new data (can be equal i.e. would like it to read both times when it receives "FE") before it sends again.</p>
  
  <p><strong>How do I get it to block when there isn't any new data?</strong></p>
  
  <pre><code>$i=0;
  while ($i&lt;10){
      //Read and Parse Client input
      $input = strtoupper(bin2hex(socket_read($spawn, 1)));
      echo $input . "\n";
  
      //Deal with requests
      if ($input == "FE"){ //Server Ping
          socket_write($spawn, $ping_packet);
          echo "Ping Attempt \n";
      } elseif ($input == "02"){ //Handshake Request
          socket_write($spawn, $handshake_packet);
          echo "Handshake Attempt \n";
      } elseif($input == "01"){ //Login Request
          socket_write($spawn, $kick_packet);
          echo "Login Attempt \n";
      }
          $i++;
  }
  </code></pre>