|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-02-28 19:50 UTC] cmb@php.net
-Package: Unknown/Other Function
+Package: Filter related
[2018-03-11 12:17 UTC] cmb@php.net
[2018-03-24 14:08 UTC] cmb@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: cmb
[2018-03-24 14:08 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 09:00:02 2025 UTC |
Description: ------------ The php_filter_float function located in /[svn]/php/php-src/trunk/ext/filter/logical_filters.c does not allow setting custom thousand separators - the function always uses built-in set of three separators provided in the tsd_sep[3] local variable, currently ",.'" (without double quotes). As a result, the function is not usable in countries which uses other char as a thousand separator, for example " ". Additionally, it does not allow to prohibit separators some of the separators. Please add support for setting custom thousand separators which will override the one built-in in the source code. Test script: --------------- var_dump(filter_var('1 000', FILTER_VALIDATE_FLOAT, array('flags' => FILTER_FLAG_ALLOW_THOUSAND, 'options' => array('thousand' => ' ')))); Expected result: ---------------- float(1000) Actual result: -------------- bool(false)