Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111449 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 97752 invoked from network); 11 Aug 2020 09:54:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Aug 2020 09:54:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1758F1804AC for ; Tue, 11 Aug 2020 01:54:01 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (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 ; Tue, 11 Aug 2020 01:54:00 -0700 (PDT) Received: by mail-io1-f54.google.com with SMTP id j8so11832207ioe.9 for ; Tue, 11 Aug 2020 01:54:00 -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; bh=TUsd4RvwxxK0rTPhpD3afpwcC0x4AJv8j5XPhGG+WzA=; b=Njtf5nJGKfOUdnBzgHZ8lQ7OLClSh3Oa9I3a97QTjMx7LHnym6LraqcERLT2owLdlP exfZMqArkYxP3q+9a8ouY3Tse6xfygDL12bw7mrFVtrcmZmh2crvRxtV5IbKQQNyDdHG 3R6JOdCDsPQb8ludE2r+jyKG5qobgdG1OtBnioCcuWVCyA/tj+yApvkG8mwVFJfPV8bs LOOncDwWjebi3sso6bxAFvgFWr2LeJofr25/elr8deGRTtXjhBgtCW3UA4M1IWCm5jMx FalHGY0eML9M7gBp3TqqNrbNSFDBTILeOJKANfMvv9u28sirsOVosaxWHypbgEpvQJ3D UIJg== 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; bh=TUsd4RvwxxK0rTPhpD3afpwcC0x4AJv8j5XPhGG+WzA=; b=IkG1EX8nMy3DGv32M2bon3rtyId0Zxp1YbGPMVDoUEHYLhAzGJWmoZ2gOQbgTQXjq5 ZA348BYZxilRv26C8Ffqvyg4tF7AmS2ohdTk+ozDHqWsuv3jaRBe3lQWiFF3KK46661Q 9xnW1tUezEKjILlh7y4+mAUNwrGL7mfx4KZOIf3tpJlXUxma+5xIPanbqEhEetIPodmA vWc8r6CFo1hTnzKVxPvt61Yg7MRTewNfVICKS5MTS45YiB6hvKQeyDQhS1LCUE9OcdAO LbmtzT+AB2IICNMV6OSX7Gff9YxDeRuAeI5Hw7OwsHsr7rGEcYELTNSowg6Z5m3XgfEw v+Dw== X-Gm-Message-State: AOAM530Xmc9Lxf0o84/I957IQUt5zpDSbJ/2SPGFySV16rpKw02HsqJm evCoSpILF8KBcR8Uyc5Ax8RcJahb+JP0UioKNx2udvcK X-Google-Smtp-Source: ABdhPJwANlr8lEZtCHgA603kFuTPeA5GSyRXiQ2nUp5V4pD/Vbe8RDrVKTXVsOof2HAp0vUVPvMIGfD0q5VzBgd8LQM= X-Received: by 2002:a05:6638:2164:: with SMTP id p4mr24193106jak.57.1597136036461; Tue, 11 Aug 2020 01:53:56 -0700 (PDT) MIME-Version: 1.0 References: <6cfb77d4d511b5c591e7d7b5cc80199955123b2cd4276a5bca2327e4b02942db@mahalux.com> In-Reply-To: <6cfb77d4d511b5c591e7d7b5cc80199955123b2cd4276a5bca2327e4b02942db@mahalux.com> Date: Tue, 11 Aug 2020 09:53:43 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000001c83fe05ac963678" Subject: Re: [PHP-DEV] Allow sleep() to accept non-integer values From: rowan.collins@gmail.com (Rowan Tommins) --0000000000001c83fe05ac963678 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 11 Aug 2020 at 08:31, Michael Vo=C5=99=C3=AD=C5=A1ek - =C4=8CVUT FE= L < 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 the 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, --=20 Rowan Tommins [IMSoP] --0000000000001c83fe05ac963678--