From:
Operating system: N/A
PHP version: 5.2.13
Package: Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:php_filter_int does not allow thousand separators
Description:
------------
The php_filter_int function located in
/[svn]/php/php-src/trunk/ext/filter/logical_filters.c does not allow
thousand separators in the provided value to valide.
Most countries allows using of thousand separators, so if the function is
not usable in validating user input.
Please provide support for thousand separators in the sense of
FILTER_FLAG_ALLOW_THOUSAND flag for php_filter_float function and Request
#51368.
Test script:
---------------
var_dump(filter_var('1 000', FILTER_VALIDATE_INT, array('flags' =>
FILTER_FLAG_ALLOW_THOUSAND, 'options' => array('thousand' => ' '))));
Expected result:
----------------
int(1000)
Actual result:
--------------
bool(false)
--
Edit bug report at http://bugs.php.net/bug.php?id=51370&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=51370&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=51370&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=51370&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=51370&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=51370&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=51370&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=51370&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=51370&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=51370&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=51370&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=51370&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=51370&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=51370&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=51370&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51370&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51370&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=51370&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=51370&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=51370&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=51370&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=51370&r=mysqlcfg