Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47316 invoked from network); 4 May 2016 18:44:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 May 2016 18:44:54 -0000 X-Host-Fingerprint: 68.118.157.39 68-118-157-39.dhcp.mdsn.wi.charter.com Received: from [68.118.157.39] ([68.118.157.39:24498] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/14-16256-4234A275 for ; Wed, 04 May 2016 14:44:54 -0400 Message-ID: To: internals@lists.php.net References: <18.B0.04700.FD2DC065@pb1.pair.com> <38.90.16256.DC90A275@pb1.pair.com> Date: Wed, 4 May 2016 13:44:49 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 68.118.157.39 Subject: Re: [PHP-DEV] Re: async/await - is future reserved words in PHP 7.x? From: me@stephencoakley.com (Stephen Coakley) On 05/04/2016 11:44 AM, Niklas Keller wrote: > 2016-05-04 16:40 GMT+02:00 Stephen Coakley : > 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