rfc:clamp

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:clamp [2021/06/23 20:41] – Updated wording, inbound -> in range. thinkverserfc:clamp [2023/06/12 13:59] (current) – withdrawn thinkverse
Line 3: Line 3:
   * Date: 2021-06-23   * Date: 2021-06-23
   * Author: Kim Hallberg, hallbergkim@gmail.com   * Author: Kim Hallberg, hallbergkim@gmail.com
-  * Status: Under Discussion +  * Status: Withdrawn 
-  * Proposed Version: PHP 8.1+  * Proposed Version: PHP 8.2
   * First Published at: http://wiki.php.net/rfc/clamp   * First Published at: http://wiki.php.net/rfc/clamp
  
Line 33: Line 33:
 clamp(num: 0, min: 2, max: 1); // clamp(): Argument #2 ($min) cannot be greater than Argument #3 ($max) clamp(num: 0, min: 2, max: 1); // clamp(): Argument #2 ($min) cannot be greater than Argument #3 ($max)
 </code> </code>
 +
 +Handling NAN; passing NAN to either of the range values will throw above ''ValueError'' since passing NAN will invalidate the range.
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
Line 54: Line 56:
 ===== Open Issues ===== ===== Open Issues =====
  
-No open issues as of yet.+1) Handling of NAN values, as mentioned [[https://externals.io/message/115076#115085|#115085]] and [[https://externals.io/message/115076#115167|#115167]].
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
Line 72: Line 74:
   * Implementation PR: [[https://github.com/php/php-src/issues/7191]]   * Implementation PR: [[https://github.com/php/php-src/issues/7191]]
   * Discussion on the php.internals mailing list: [[https://externals.io/message/115050]]   * Discussion on the php.internals mailing list: [[https://externals.io/message/115050]]
 +  * Announcement thread: [[https://externals.io/message/115076]]
  
 ===== Rejected Features ===== ===== Rejected Features =====
  
 No rejected features currently. No rejected features currently.
rfc/clamp.1624480901.txt.gz · Last modified: 2021/06/23 20:41 by thinkverse