Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122536 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 6F4B51ADA85 for ; Fri, 1 Mar 2024 01:16:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1709241184; bh=iHJ9jQc4P09akFVufw0nPk+prarj729cCuNbzzuNPJU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=fAPxan26v0X4gb3DClfQ3SNNpKX0HDMa0Fl5HTim1ekXjhYNHPTGAPUdi5KoQHWNx 52/9hO3yA1ZN7a7/M6OZfrIfkF5OlD2UVsM3jr/Iaxcnbg/EYyihDaDjns2t58DO6Q GIMqyVS+ZcKKz3wb44CF9eSdm2US4pGP3YJWuKODGkImqj2I3K7kAclsTObte7EeF3 cB5vcPcAtTnVZFkkvXxozhhydA55MKScb4ar7P1UEVMqgKQjrcFfCXtmWQLQyncd26 BOA1gd7GqReuFLLv898v+1A7Qo17sLz6GIKgIYDSHYO7vI2QPfWoL028eJRxuNjOYH CJT+dz8f4dJ+g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E9582187A3C for ; Thu, 29 Feb 2024 21:13:02 +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.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 29 Feb 2024 21:13:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1709241171; bh=XkZv+4EM4T4jTpTJSroVKCsJ0Ni3hyv4QESRw0Geisw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=f2oRSyOIEj9Zblvka0KiNIo0Aw8Zv67D4Id9vIKLjp8tTsPWC5gM3j6ahyilUUfR7 i8Utk7ljD9BsO7b7Dzgp9yKuJu+DiSJzWgFgq4MGXCr0ciNZPNz9tldBBO5pI1lusG YzIUsVBizjOG3xaOyPYS7WoMVB48urhKvASiAhfGFQb781JGwuty/B4mkfLqBed2X+ poITrcwlC/LG+1xcgoFGs6O4pmHP/5H62p3CjzC2mtaEz5n38SZ8Ofmfn0lyv390yN gA3iTyWAASHPntXbSAm2PheKQ3QskWRvd+iBRJ5e5d5/yVeI/9hHq0lUm59qlAypTR J0KUhTh79nRwQ== Message-ID: <7d05d51f-f301-4d62-b1c0-83e6a2e0632e@bastelstu.be> Date: Thu, 29 Feb 2024 22:12:48 +0100 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] int|float for sleep? sleep(0.1) => sleep 0.1 seconds To: Hans Henrik Bergan Cc: PHP Internals List References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 2/26/24 12:26, Hans Henrik Bergan wrote: > Made a RFC draft: https://wiki.php.net/rfc/sleep_function_float_support > > First time, so I'm not surprised if there are some mistakes there. Thank you for the RFC. I have some suggestions to improve the readibility within the Wiki, as Markdown doesn't really render well there. The documentation is here: https://wiki.php.net/wiki/syntax - Instead of using backticks, use `sleep()` for inline and `` 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. Regarding the contents: 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. For the "Unaffected PHP Functionality" you could just spell out that anything that is not the sleep() function will be unaffected and more specifically any code that does not currently emit a deprecation is most likely unaffected. Regarding the voting options, I agree with Ayesh that 6 votes is too many. I'd even say it's 5 votes too many, instead of 3 votes to many. 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. I don't think I've ever seen anything using the return value of sleep(). Furthermore it doesn't make sense to accept (1), but not accept (3), as that would result in somewhat inconsistent behavior as you cannot $sleep = somefloat; while (($sleep = sleep($sleep)); to sleep for that exact somefloat value in the face of interrupts. Simple RFC, simple voting choice. Lastly, I see that the RFC still is in Draft stage. Don't forgot to open up a dedicated explicit discussion thread once you move it into the "Discussion" phase. Best regards Tim Düsterhus