rfc:sleep_function_float_support

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rfc:sleep_function_float_support [2024/02/25 11:56] – created divinity76rfc:sleep_function_float_support [2024/03/08 08:00] (current) – backto6 divinity76
Line 1: Line 1:
 ====== PHP RFC: Support for Floats in Sleep Function ====== ====== PHP RFC: Support for Floats in Sleep Function ======
-  * Version: 0.1-dev+  * Version: 0.2-dev
   * Date: 2024-02-25   * Date: 2024-02-25
   * Author: Hans Henrik Bergan (hans@loltek.net), Michael Voříšek (?)   * Author: Hans Henrik Bergan (hans@loltek.net), Michael Voříšek (?)
   * Status: Draft   * Status: Draft
-  * First Published at: http://wiki.php.net/rfc/sleep_function_float_support+  * First Published at: http://wiki.php.net/rfc/sleep_function_float_support , https://github.com/php/php-src/pull/13401
  
 ===== Introduction ===== ===== Introduction =====
Line 41: Line 41:
  
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
-This feature is proposed for the next minor PHP version following the acceptance of this RFC. +Next PHP Minor (currently 8.4) and next PHP Major (currently PHP9)
-Currently PHP8.4.+
  
 ===== RFC Impact ===== ===== RFC Impact =====
  
 ==== To SAPIs ==== ==== To SAPIs ====
 +
 No impact on SAPIs is anticipated. No impact on SAPIs is anticipated.
  
 ==== To Existing Extensions ==== ==== To Existing Extensions ====
 +
 No existing extensions are expected to be affected by this change. No existing extensions are expected to be affected by this change.
  
 ==== To Opcache ==== ==== To Opcache ====
 +
 No impact on Opcache is anticipated. No impact on Opcache is anticipated.
  
 ==== New Constants ==== ==== New Constants ====
 +
 No new constants will be introduced by this RFC. No new constants will be introduced by this RFC.
  
 ==== php.ini Defaults ==== ==== php.ini Defaults ====
 +
 This RFC does not introduce or alter any php.ini settings. This RFC does not introduce or alter any php.ini settings.
  
 ===== Open Issues ===== ===== Open Issues =====
 +
 There are no open issues related to this RFC. There are no open issues related to this RFC.
  
-===== Unaffected PHP Functionality ===== +===== Proposed Voting Choices =====
-(guess this section should be removed?)+
  
-===== Future Scope ===== +### 1. Enhancement of Precision: Float Arguments for Sub-Second Precision
-N/A +
-(guess this section should be removed?)+
  
-===== Proposed Voting Choices =====+**Should we extend `sleep()` to accept floats for sub-second delays?** 
 +- Yes 
 +- No
  
-Voting will be conducted as three separate choicesThis approach allows contributors to consider the merits and implications of each enhancement individually, ensuring that each proposal is evaluated on its own potential impact and utilityThe proposed voting choices are as follows:+**Which PHP version should implement this feature if accepted?** 
 +- 8.
 +- 9.0
  
-1. **Acceptance of Float Arguments for Sub-Second Precision**:  +### 2Normalized Return Values on Windows
-   - **Yes**: Support extending the `sleep()` function to accept both integers and floats, enabling delays with sub-second precision. +
-   - **No**: Oppose the change and keep the `sleep()` function limited to integer arguments.+
  
-2. **Normalized Return Values on Windows**: +**Should we modify `sleep()` on Windows for consistent return values?** 
-   - **Yes**: Support modifying `sleep()` on Windows to return the number of seconds remaining upon interruption, aligning its behavior with other platforms. +- Yes 
-   **No**: Oppose the change and maintain the current behavior where `sleep()` returns 192 (WAIT_IO_COMPLETION) on Windows when interrupted.+- No
  
-3. **Return Value Precision Enhancement**: +**Which PHP version should implement this feature if accepted?** 
-   - **Yes**: Support enhancing the precision of the `sleep()` function'return value to include fractions of a second when sleep is interrupted. +8.4 
-   - **No**: Oppose the change and maintain the current behavior of returning an integer value for the number of seconds remaining.+- 9.0 
 + 
 +### 3. Enhanced Return Value Precision 
 + 
 +**Should we increase `sleep()` return value precision to include fractions of a second?** 
 +Yes 
 +- No 
 + 
 +**Which PHP version should implement this feature if accepted?** 
 +- 8.4 
 +- 9.0
  
-Voters are encouraged to consider the benefits and implications of each proposal independently. 
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
 +
 A pull request has already been submitted and is available for review at: https://github.com/php/php-src/pull/13401 A pull request has already been submitted and is available for review at: https://github.com/php/php-src/pull/13401
  
 ===== Implementation ===== ===== Implementation =====
 +
 Upon acceptance, the feature will be merged into the specified PHP version, and all relevant documentation will be updated accordingly. Upon acceptance, the feature will be merged into the specified PHP version, and all relevant documentation will be updated accordingly.
  
Line 99: Line 114:
 - PHP Manual on `sleep()`: https://www.php.net/manual/en/function.sleep.php - PHP Manual on `sleep()`: https://www.php.net/manual/en/function.sleep.php
  
-===== Rejected Features ===== +
-N/A +
-(guess this section should be removed?)+
rfc/sleep_function_float_support.1708862218.txt.gz · Last modified: 2024/02/25 11:56 by divinity76