Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111653 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40834 invoked from network); 20 Aug 2020 13:24:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Aug 2020 13:24:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 42976180539 for ; Thu, 20 Aug 2020 05:25:42 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 20 Aug 2020 05:25:41 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id s2so1970847ioo.2 for ; Thu, 20 Aug 2020 05:25:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KcNcojgEvJYesinbqDLEOIHztoLevIDOnKLWxTPJNfw=; b=L5kZBDKj5QjRejKNwreCwDYHL0J65j99aMPTcdmd/m+ZrSkhVOjXZoOE/u4XV2b0hy OfwJ936BV9yuqGNUSMMIEx0FdgzIishjdB88nkebKL8V8fzU5q9tBOov6Xar6lajQ/Z6 KWorYfol7z8YACKYhbRd/DLrAvmfvrBhhZltQqW32HGxqSsmmvjnEygjV8vwXZD+NmQB D4NEdu6n/XEGfagyabXT7DGOivq436yxTWm2gHZRqELrBzT9sswuGQuqWyWUsDWpXoGT FHMVejiDmGJ/lDsMlqeINV18f7TtfPxdEn45zbwIVVJFkU2QEPc7BDTthfNn+i/MpKns dTUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KcNcojgEvJYesinbqDLEOIHztoLevIDOnKLWxTPJNfw=; b=S9C/Jw+Ab65tQhFd+nVLkKxYEWS6wiBzYMfir4cXoYLfUTX+BTUOWWiNhkeGdOt/Y6 ir9FdMQD0BzpDzT4hn8w6HPU3G4bEPnCrxcUeZkhUcGheDclKsPumbHkCI90apbCCyD7 aQ0VMijJquMMjEiGT9FFYKCpFF8pV0pT1MYjxps/TKynBi2ypx73ysl5JjqjRd0KONFj NRR7xs/vjltJ4i0Jq5JYoZ6PzzGCe0iwNhg2CF/KCnHbxU2KpDXJpKHhCbl+pGhymy+Y K+y9KS35NjV4XgRspb2/WUN6AdPTwP9daE+mnHZlHWGG5q/flNQvclLRi3Wr0knWoci+ 3laA== X-Gm-Message-State: AOAM532u4dJvd1BCkzTu6meZNC3NtbuF78VoJIsTAVK5muIW8/V2oO/z dctN7FoYp9PIANLDLpiAUjmLafk5IMfiS+AcHO0tL5PHnm4qhQ== X-Google-Smtp-Source: ABdhPJzLUqq93LmVjOnYvM/ZFCmgE3Wb0M50If93Wr1Z05HgHvdhDyGACh+nPgeGKPhIlLsyGiMUYUYgU5aWurTovOg= X-Received: by 2002:a5e:d514:: with SMTP id e20mr2360210iom.183.1597926339661; Thu, 20 Aug 2020 05:25:39 -0700 (PDT) MIME-Version: 1.0 References: <6cfb77d4d511b5c591e7d7b5cc80199955123b2cd4276a5bca2327e4b02942db@mahalux.com> <4a6d97c1-28e8-c6cb-e985-d32c5d056ec0@telia.com> In-Reply-To: Date: Thu, 20 Aug 2020 14:25:23 +0200 Message-ID: To: =?UTF-8?B?TWljaGFlbCBWb8WZw63FoWVrIC0gxIxWVVQgRkVM?= Cc: Sara Golemon , PHP internals Content-Type: multipart/alternative; boundary="000000000000da530c05ad4e37da" Subject: Re: [PHP-DEV] Allow sleep() to accept non-integer values From: carusogabriel34@gmail.com (Gabriel Caruso) --000000000000da530c05ad4e37da Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 20 Aug 2020 at 14:16, Michael Vo=C5=99=C3=AD=C5=A1ek - =C4=8CVUT FE= L < vorismi3@fel.cvut.cz> wrote: > Hi everyone, > > thank you for your comments, based on them, I fixed these: > > - usleep is now used as a fallback as well, if interrupted, remaining > time is measured using microtime, so return value is always available > > - for BC, if not interrupted, return value remains to be 0 (integer > zero) > > Now, the sleep() function should be really universal, cross platform and > I would say also the prefered way to sleep. > > The implementaion is here https://github.com/php/php-src/pull/5961/files > > > Please comment on Github directly if you have any feedback left. > > > I thinkit's worth considering if this also should be fixed in 8.0 or > even earlier ;-)So good to hear the RM view on this. > > Sara, are you ok to include this in PHP 8.0 and do you require a RFC for > it? > > With kind regards / Mit freundlichen Gr=C3=BC=C3=9Fen / S p=C5=99=C3=A1te= lsk=C3=BDm pozdravem, > > Michael Vo=C5=99=C3=AD=C5=A1ek > > On 11 Aug 2020 12:43, Bj=C3=B6rn Larsson wrote: > > > Den 2020-08-11 kl. 10:53, skrev Rowan Tommins: > > > > On Tue, 11 Aug 2020 at 08:31, Michael Vo=C5=99=C3=AD=C5=A1ek - =C4=8CVU= T FEL < > > vorismi3@fel.cvut.cz> wrote: > > > > I am the author of https://github.com/php/php-src/pull/5961 , please > > provide feedback. > > > > This idea makes a lot of sense to me as a user (I'll leave comments on > the > > implementation to those with more C experience). > > > > I'm pretty sure I've accidentally written things like "sleep(1.5)" in t= he > > past, and think there is a strong argument for changing something here: > > > > Another reason is that sleep(0.1); is silently accepted now (even with > strict types enabled), but the input is casted to 0 and thus producing > > unexpected behaviour if the user is not aware of the current method > > prototype. > > > > Unless there are problems with the implementation, this seems like a > > straight-forward win. > > > > Regards, > > Given this unexpected behaviour, one could almost see it as a bug. I > think > it's worth considering if this also should be fixed in 8.0 or even > earlier ;-) > So good to hear the RM view on this. > > r//Bj=C3=B6rn L I don't know about Sara's opinion here, but mine, as PHP 8.0's other Release Manager, this change requires an RFC and it should target PHP 8.1. PHP 8.0 has been feature frozen for a while now. --000000000000da530c05ad4e37da--