Re: Re: async/await - is future reserved words in PHP 7.x?

From: Date: Wed, 04 May 2016 18:44:49 +0000
Subject: Re: Re: async/await - is future reserved words in PHP 7.x?
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-93075@lists.php.net to get a copy of this message
On 05/04/2016 11:44 AM, Niklas Keller wrote:
2016-05-04 16:40 GMT+02:00 Stephen Coakley <me@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

« previous php.internals (#93075) next »