On 05/04/2016 11:44 AM, Niklas Keller wrote:
2016-05-04 16:40 GMT+02:00 Stephen Coakley <m...@stephencoakley.com>:
Why do we have to wait until PHP 8? Should be mostly backwards compatible
and be fine in 7.2 or so. Issue is probably more deciding on an API.
I don't think we should wait, I was just thinking that it might not be
ready until that time.
Also, if we plan on rewriting streams and I/O to all be async and use
libuv underneath, that would probably be a BC break unless the existing
functions just become blocking interfaces for a separate async API. If
it was a large BC break, it probably would need to wait for PHP 8.
Now that I think about it, that would be our chance to replace stream
resources with classes...
$file = \php\stream::open("file.txt");
$bytes = await $file->read(1024);
$file->close();
Then rewrite fread() and friends to be aliases that block instead of
await results.
--
Stephen
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php