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

From: Date: Sat, 14 Dec 2019 17:35:20 +0000
Subject: Doc #78959 [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-17125@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:             Closed
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        7.4.0
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better


Previous Comments:
------------------------------------------------------------------------
[2019-12-14 17:35:08] salathe@php.net

Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=fd39884841d5a2fec1746a9a7287dcd709f819d2
Log: Fix #78959: FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0

------------------------------------------------------------------------
[2019-12-14 17:34:45] cmb@php.net

Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=348513
Log: Fix #78959: FILTER_VALIDATE_FLOAT supports min_range in php >= 7.4.0

------------------------------------------------------------------------
[2019-12-14 17:33:57] cmb@php.net

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

------------------------------------------------------------------------
[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 (#17125) next »