Doc #78959 [NEW]: FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0

From: Date: Fri, 13 Dec 2019 15:16:37 +0000
Subject: Doc #78959 [NEW]: FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17110@lists.php.net to get a copy of this message
From:             divinity76 at gmail dot com
Operating system: 
PHP version:      7.4.0
Package:          Documentation problem
Bug Type:         Documentation Problem
Bug description:FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0

Description:
------------
as can be seen here https://3v4l.org/BBUsI , 
 FILTER_VALIDATE_FLOAT supports min_range / max_range in >= 7.4.0 , 
but it's not documented anywhere as far as i can see, but there's 3
places i can think of where documentation would be appropriate: 

1: the 7.4.0 changelog at https://www.php.net/ChangeLog-7.php#7.4.0

2: the FILTER_VALIDATE_FLOAT documentation at
https://www.php.net/manual/en/filter.filters.validate.php

3: (maybe? not sure?) the filter_var() documentation at
https://www.php.net/manual/en/function.filter-var.php

Test script:
---------------
<?php

var_dump(
   
filter_var(5,FILTER_VALIDATE_INT,array('options'=>array('min_range'=>6))),
   
filter_var(5,FILTER_VALIDATE_FLOAT,array('options'=>array('min_range'=>6)))
    );

Expected result:
----------------
bool(false)
bool(false)


Actual result:
--------------
php < 7.4.0: 
bool(false)
float(5)
php >= 7.4.0: 
bool(false)
bool(false)


-- 
Edit bug report at https://bugs.php.net/bug.php?id=78959&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=78959&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=78959&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=78959&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=78959&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=78959&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=78959&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=78959&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=78959&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=78959&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=78959&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78959&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=78959&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=78959&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=78959&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=78959&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=78959&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=78959&r=mysqlcfg


Thread (4 messages)

« previous php.doc.bugs (#17110) next »