PHP RFC: Your Title Here
- Version: 0.9
- Date: 2024-04-11
- Author: Robert Landers, landers.robert@gmail.com
- Status: Draft (or Under Discussion or Accepted or Declined)
- First Published at: http://wiki.php.net/rfc/define-negative-execution-time
Introduction
Currently, a negative max execution time may be set to a negative number without warning or error. The documentation does not define what happens when a negative number is given, and this RFC deprecates passing a negative number.
Proposal
Given a max_execution_time either via a php.ini setting or via set_time_limit() will result in a deprecation notice from 8.4+ and a fatal error in 9.0+. Numbers greater than 999,999,999 (31 years, 259 days) will be set to 0 (unlimited).
Backward Incompatible Changes
* Legacy code passing a negative number will receive a deprecation notice.
Proposed PHP Version(s)
8.4: deprecation notice 9.0: fatal error
RFC Impact
To SAPIs
The potential of a fatal error while applying the configuration.
To Existing Extensions
None
To Opcache
None
Open Issues
Not yet.
Unaffected PHP Functionality
No change for positive integers in the bounds.
Proposed Voting Choices
* yes: to apply a deprecation warning and fatal error in the next major version * no: to keep it undefined
Patches and Tests
PR conforming setting negative numbers to 0: https://github.com/php/php-src/pull/13942
Implementation
After the project is implemented, this section should contain
- the version(s) it was merged into
- a link to the git commit(s)
- a link to the PHP manual entry for the feature
- a link to the language specification section (if any)
References
Links to external references, discussions or RFCs
Rejected Features
Keep this updated with features that were discussed on the mail lists.