#40075 [Fbk->Csd]: FILTER_CALLBACK generates strange results
| From: | crocodile2u at yandex dot ru | Date: | Tue, 09 Jan 2007 14:20:07 +0000 |
| Subject: | #40075 [Fbk->Csd]: FILTER_CALLBACK generates strange results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107364@lists.php.net to get a copy of this message | ||
ID: 40075
User updated by: crocodile2u at yandex dot ru
Reported By: crocodile2u at yandex dot ru
-Status: Feedback
+Status: Closed
Bug Type: Filter related
Operating System: Kubuntu linux 6.06
PHP Version: 5.2.0
New Comment:
Just installed the latest snapshot. Everything works like a charm.
Thanks a lot.
Previous Comments:
------------------------------------------------------------------------
[2007-01-09 14:13:18] pajoye@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2007-01-09 13:43:39] crocodile2u at yandex dot ru
Description:
------------
Specifying a simple callback for the filter_var_array function leads to
invalid results.
Reproduce code:
---------------
function t($v){return $v;}
var_dump(filter_var_array(array("x"=>"s"),
array("x"=>array("filter"=>FILTER_CALLBACK,
"options"=>"t"))));
Expected result:
----------------
array(1) {
["x"]=>
string(1) "s"
}
Actual result:
--------------
array(1) {
["x"]=>
string(1) "("
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40075&edit=1