Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122566 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id DD2781AD8F6 for ; Tue, 5 Mar 2024 13:10:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1709644233; bh=v4nQ/PK0Mwd9SJciZePLUybIDI6JWHa38WCvnwWQ5iw=; h=References:In-Reply-To:From:Date:Subject:To:From; b=lFgKVZ8IeRtKm49ZFEKPOtRKR/oLNQxiDCkOIUF9S2KU2+F6IiHJMU1al27Ad6Qv9 3NMOvJuQs6OLvFmtDUVfoQTlvSj9eYwaPzovC/DC7ME2DG913RApcWtS4xMto1v5fp t7ljiP0S3gX5v+F1qUmyIltaLfruIdjqPrA2FxXG1gB6os6527+QFBuGsZkxAVHuRw 3Gq6TixdLbJnhY9ktnZ0GPOFs3ejw+m9ztLMiSSjV1RoB5L7LpN3+J9D2T5xL1mYZg 9H13kpIBBhpDTl5niZeHwYSTPj4QqARVQdcdCaTYG8G9kFleZ90eGydMgn8/Nf4MBf w6/G/aAkMSdgw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AF8BB18006C for ; Tue, 5 Mar 2024 13:10:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f42.google.com (mail-oo1-f42.google.com [209.85.161.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 5 Mar 2024 13:10:32 +0000 (UTC) Received: by mail-oo1-f42.google.com with SMTP id 006d021491bc7-5a11dea5bbaso1998791eaf.2 for ; Tue, 05 Mar 2024 05:10:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709644219; x=1710249019; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SA91laJTAgpilXoaK/RMnjO8YchX4DCXDOM6dVtjAnw=; b=Oa36fnSCepaXoKDVTRde2tqh4aiQbj8i+18gMkc6XSJK+EcN5SJl/TxtYVfAlIY0qE o5e5CwUOUesLzkXLP3qAZ9Wrrs4UrppFF3dlV0+DxfZH4kMOlhD2SP4wMLa16/+YQjiV 0eigOoYVisdvonv7Vf3rA3a2b0kNjA2Kdvm+SQ4M5CA0hpKf1G78Kg7zxYLEtlmIuPRF +BD0Ye/k6xiQKu5SvDsaK5OFnlIfAb3tsrgKnCiHxnJAH4UTE/VvUdscfnPCS2yR+LeV dTVcyEo39ESVcOMJqjg5DNFJ73Sm7rc1cBYmPqJcyG+kQkC8Q7zFuGM7Ivy/YJr50qZy 0Fdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709644219; x=1710249019; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SA91laJTAgpilXoaK/RMnjO8YchX4DCXDOM6dVtjAnw=; b=BwSuGoWHFkkc4v2EPyYWMebdabxxcateBf1fOf3sYB9sKNJItilBJ5z13cMbdIxQe0 H4t5n3ByQifOzUnSn5QYg0+YWcs98+HPasNZu6sXy++LfNvJm3tSyN950tcrU66+iAjj bmnOHcYmL/iRaMfs+fr8rMVFMoz7WdJ9acXiMjlxgfqiqlFNjuJ7Dq4GwY0aPJZFzUDs +gCXJKHIk2rn6/I1FKIXvWriI4abF3spoJ4i6T8B2RLkKFkF6jAfw8oc6MdzaQcnU0qe MzpQLddFSTHIPdGXvCeNMMsnCNZ8hMr0rW9KQWrv4DQ9VQ79cyc7SWe77NbHtdVM61gE gFMQ== X-Gm-Message-State: AOJu0YwtoHswY9BNL6N9zstUsPgr+0wpOmwHGJxC6lioe1b/VqfhFqnK XZfIpKCZE7RTobmRwakc2Kq45nLC0XwRxntvylZZX6OYeiVA8xgY/y70M9OePkvhkYXImVNG71X 3RZZQbW6sR/6dOaWhijplQIQAn0azJTv2gP4= X-Google-Smtp-Source: AGHT+IHGMCDcp4U0ZSJeiJivmijLsuqre3I9k6LpP2T4If3Q5dGvNU3JVrouGkBrajr8WWgM4hwOeTK2IY5GBKTT6Qo= X-Received: by 2002:a4a:3001:0:b0:5a1:316c:2d96 with SMTP id q1-20020a4a3001000000b005a1316c2d96mr1671778oof.1.1709644218913; Tue, 05 Mar 2024 05:10:18 -0800 (PST) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <7d05d51f-f301-4d62-b1c0-83e6a2e0632e@bastelstu.be> In-Reply-To: <7d05d51f-f301-4d62-b1c0-83e6a2e0632e@bastelstu.be> Date: Tue, 5 Mar 2024 14:09:44 +0100 Message-ID: Subject: Re: [PHP-DEV] int|float for sleep? sleep(0.1) => sleep 0.1 seconds To: PHP Internals List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: divinity76@gmail.com (Hans Henrik Bergan) Voting has now been simplified to 3x no/php 8.4/php 9.0 questions. (I actually would've preferred the original 6, would have been unambiguous if people are supposed to checkbox only 8.4 or both 8.4 and 9.0, and would have been easier to see the % of people who voted only 9.0, I think. But I don't care enough about it to actually fight for it, and multiple people requested it be reduced to 3, so let's go with that :) ) >That said, thanks for making this, it's something I'd like to see in PHP a= s well. Happy to hear it :) > - Instead of using backticks, use `sleep()` for inline and `=E2=80=A6` for multi-line snippets. This comes with syntax highlighting and documentation links. >(...) > - It would help readability if you'd use additional headlines for each of the three sub-proposals within the Proposal section. > I don't want to spend too much effort on nitpicks, but if someone volunteers to improve it, I'd be happy to add it, in which case please send a PR to https://github.com/divinity76/stuff/blob/phprfc/2024/sleep_fun= ction_float_support.md > For (2) it would help if you'd explain what it means for sleep() to be interrupted and how this can happen. I believe this is signal-handling related, but writing it out explicitly for the folks that didn't yet encounter it would probably make sense. I'm not an expert, but when researching this on Windows 10 + PHP 8.3.2, I couldn't actually get it to return 192. (nor return anything except 0): - When sending a WM_CLOSE message (equivalent to `taskkill /IM php.exe`), it was just completely ignored: PHP kept sleeping. - When doing a TerminateProcess() call (equivalent to `taskkill /IM php.exe /F`), PHP was just terminated, sleep never returned. - When sending a CTRL_C_EVENT (equivalent to ctrl+C), PHP just terminated, sleep never returned. - When sending a CTRL_BREAK_EVENT (equivalent to ctrl+Break), PHP just terminated, sleep never returned. I don't know how to make it return 192 on Windows.. Anyone know? >For the "Unaffected PHP Functionality" you could just spell out that anyth= ing that is not the sleep() function will be unaffected meh, someone else pointed out that the irrelevant sections could be removed, I removed the "Unaffected PHP Functionality" section (along with 2-3 others) > I'd just put a single "Do all of this in the next minor" vote there. All >of the suggested improvements make sense to me and the breaking changes >are mostly theoretical. meh, I don't want to risk the RFC getting rejected because too many people thought it should be done in next.major instead of next.minor, let's keep both next.minor + next.major vote options. (You're probably right, I predict a majority vote for next.minor for all 3, but i'll keep the vote options just in case.) >I don't think I've ever seen anything using the return value of sleep(). same here. >Don't forgot to open up a dedicated explicit discussion thread once you mo= ve it into the "Discussion" phase. How would I even do that? Linking to https://externals.io/message/122388 isn't sufficient?