# Stream Context Option on Windows

> Section in “New and Extended Functionality › I/O and Filesystem” of the book [PHP 7 Explained](https://php7explained.com/) by Sebastian Bergmann and Stefan Priebsch, published by thePHP.cc. The book covers PHP 7.0 to 7.4 and was last updated in November 2020. HTML version: <https://php7explained.com/new-and-extended-functionality/io-and-filesystem/stream-context-option-on-windows/>

A new stream context option was introduced in PHP 7 that only works on Windows. It allows for blocking reads on pipes:

``` php
$options = [
    'pipe' => ['blocking' => true]
];

$context = stream_context_create($options);

// ...
```

---

Previous: [New function stream_isatty()](https://php7explained.com/new-and-extended-functionality/io-and-filesystem/new-function-stream_isatty/index.html.md) | Next: [Debugging PDO Prepared Statement Emulation](https://php7explained.com/new-and-extended-functionality/io-and-filesystem/debugging-pdo-prepared-statement-emulation/index.html.md)
