note 99462 deleted from function.filter-var-array by cmb
| From: | cmb@php.net | Date: | Mon, 24 Oct 2016 22:20:36 +0000 |
| Subject: | note 99462 deleted from function.filter-var-array by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206950@lists.php.net to get a copy of this message | ||
Note Submitter: xavier
----
When I run the script on my linux box (php 5.2.10) the output of "Example #1 A
filter_var_array() example"
is actually:
array(6) {
["product_id"]=>
string(17) "libgd%3Cscript%3E"
["component"]=>
array(1) {
[0]=>
int(10)
}
["versions"]=>
string(6) "2.0.33"
["doesnotexist"]=>
NULL
["testscalar"]=>
bool(false)
["testarray"]=>
array(1) {
[0]=>
int(2)
}
}
Notice that the values of "product_id" and "versions" are not arrays. If you
add the FILTER_FORCE_ARRAY flag to the "product_id" and "versions" filter arrays
then the output returns as it is outlined in the example.