Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111455 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 26745 invoked from network); 11 Aug 2020 12:27:58 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Aug 2020 12:27:58 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4A52218050A for ; Tue, 11 Aug 2020 04:27:21 -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-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 04:27:20 -0700 (PDT) Received: by mail-ej1-f47.google.com with SMTP id a26so12710936ejc.2 for ; Tue, 11 Aug 2020 04:27:20 -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=v3L87amcNuLUSfQLZfE5jY7CNHTUc4TCVuV7a2liZU4=; b=Gq/gxFXO5p5qy6QFQml1+/zu6t+jZ0QxYczuY+gj89LJFoQhqxscOuaf+JRaawtymX N9i6ax9T8I75fhiTZ/M4hySi6TLdCzKqRvmxPRpciOiVSnB4fCvowUjLGSpMXuDWUSfq k73ZkQn/f9WjfTuWjRCEtH/VMl7Vov8+5Ts1SYQwICOzkNWGewF3yOGuuPjjbV+Jex/p ZyvRWQoVYOo7J/cozyLRUPaW+gCz8UzAhR/ail7uWpJMKkJSNXifFk0s9oz0BEtSuU62 qF9tShhj/6pzMistCLhPHEoR+PminPuUG5rPhIlALuODa3gUDZrXpmlBulAn4x4gjcNH B0yQ== 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=v3L87amcNuLUSfQLZfE5jY7CNHTUc4TCVuV7a2liZU4=; b=snfGD4pycdw16YmxXoygVI+8Ft9K/h1FtRimdVKdewy70vx9V6HZtD+sqGbr8zb8i/ d5LS7AbVYlsWDZSyL0sCRhBBBHd8jQfzOfWWgTOA8C3e4JholA35NDalBb98St2ittzz Rhp2ttLRx9kkix7eR2NMhDak+xKsKGhf31ceMvN0t1bXcyD6dKDLIwFG2HP1SvKytW0i VcciaE848XXO/uoodw9Bs1Z9OBJc21W1EN5xa3oYl5k3PnzHOT1Q1mQUT26SIDMBCqy0 lrfa8wwsmoKaoBIUKdJ08O2WNDA9gc7zcj7rBX8sZFGANr0nbY5RGimy2GL+TK/LRsIM pRKg== X-Gm-Message-State: AOAM533vGwqev0MQmAXFF4Ai3mqg62foRajmonaEPsGgv6bDOrvPL2HB PZTwykI4hniA65hhjPu8glhm2Nt3uNeU9598XK8= X-Google-Smtp-Source: ABdhPJxr+w3hENwcNFZJp3xKJPTCB7Gzs2/8mOddeodLtvg11SKDk90bA3VXo86sxSKSMb4DpnNp+4r0CSQSlYXStG0= X-Received: by 2002:a17:906:7291:: with SMTP id b17mr25331924ejl.25.1597145239421; Tue, 11 Aug 2020 04:27:19 -0700 (PDT) MIME-Version: 1.0 References: <6cfb77d4d511b5c591e7d7b5cc80199955123b2cd4276a5bca2327e4b02942db@mahalux.com> In-Reply-To: Date: Tue, 11 Aug 2020 13:27:07 +0200 Message-ID: To: =?UTF-8?B?TWljaGFlbCBWb8WZw63FoWVrIC0gxIxWVVQgRkVM?= Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000a686f505ac985a1d" Subject: Re: [PHP-DEV] Allow sleep() to accept non-integer values From: george.banyard@gmail.com ("G. P. B.") --000000000000a686f505ac985a1d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 11 Aug 2020 at 13:03, Michael Vo=C5=99=C3=AD=C5=A1ek - =C4=8CVUT FE= L < vorismi3@fel.cvut.cz> wrote: > > Another reason is that sleep(0.1); is silently accepted now (even with > strict types enabled), > > > > That appears to not be true: https://3v4l.org/7YbqX > > corrected, should be "without strict types enabled" - > https://3v4l.org/A2olN > > "even with strict type enabled" statement in BC section remains valid > That's a normal type juggling behaviour of PHP to silently truncate float to integers. Maybe something that we should change by emitting a E_WARNING but that would need an RFC. Therefore I don't see why sleep should get special treatment. I also echo Dan's concerns and I find this change all in all negative. Now we need to deal with IEEE 754 floating point semantics and converting "manually" to an integer range to pass it to functions which might not be available on the platform and then still end up using sleep(0) on the C level. I'd rather see the failure condition changed to reject 0 or add a E_NOTICE/E_WARNING if 0 is passed as this has questionable semantics. Best regards George P. Banyard --000000000000a686f505ac985a1d--