Doc #78959 [Opn->Csd]: FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0

From: Date: Sat, 14 Dec 2019 17:33:57 +0000
Subject: Doc #78959 [Opn->Csd]: FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17124@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78959&edit=1

 ID:                 78959
 Updated by:         cmb@php.net
 Reported by:        divinity76 at gmail dot com
 Summary:            FILTER_VALIDATE_FLOAT supports min_range in php >=
                     7.4.0
-Status:             Open
+Status:             Closed
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        7.4.0
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=web/php.git;a=commit;h=ce4dfd23d5617c9614f5e3f8d9a8719309941639
Log: Fix #78959: FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0


Previous Comments:
------------------------------------------------------------------------
[2019-12-13 17:55:12] cmb@php.net

See <https://www.php.net/manual/en/migration74.new-features.php#migration74.new-features.filter>.

------------------------------------------------------------------------
[2019-12-13 15:16:37] divinity76 at gmail dot com

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 this bug report at https://bugs.php.net/bug.php?id=78959&edit=1


Thread (4 messages)

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