title: PHP: How to capture a timeout on a dio_read()?
body: <p>I am using <code>dio_read</code> in PHP to capture input from a serial device (specifically the USB IR Toy v2 from Dangerous Prototypes).</p>
  
  <p>Sometimes the input from the device is slow (10+ seconds). I'd like to timeout the <code>dio_read</code>, but not sure how.</p>
  
  <p>If someone reading this post knows how, could you help point me in the right direction? thanks.</p>