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
Last revisionBoth sides next revision
rfc:clamp [2021/07/03 14:35] – Add NAN behaviour thinkverserfc:clamp [2021/07/08 10:49] – Update proposed version to PHP 8.2 thinkverse
Line 4: Line 4:
   * Author: Kim Hallberg, hallbergkim@gmail.com   * Author: Kim Hallberg, hallbergkim@gmail.com
   * Status: Under Discussion   * Status: Under Discussion
-  * 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 34: Line 34:
 </code> </code>
  
-Handling NAN; passing NAN to either of the range values will throw a TypeError since passing NAN will invalidate the range. Might throw ValueError instead of TypeError.* If NAN is passed to num, clamp will return float(NAN). +Handling NAN; passing NAN to either of the range values will throw above ''ValueError'' since passing NAN will invalidate the range.
- +
- +
-* Will change type if the exception isn't correct for this scenario.+
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
rfc/clamp.txt · Last modified: 2023/06/12 13:59 by thinkverse