I would actually prefer:

```php
$data = '';
while ($dataread = fread($pipe, 8192)) {
    $data .= $dataread;
}

if ($dataread) {
    $read[$type] = $data;
}
```

That way we are not reliant on ensuring something gets unset, but regardless, I created something more in line with the suggestions in #9630.  Cheers.