xref: /php-src/ext/filter/tests/054.phpt (revision 74859783)
1--TEST--
2filter_var_array() - using the add_empty option
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7
8$data = array('foo' => 123);
9
10var_dump(
11    filter_var_array($data, array('foo' => array('filter' => FILTER_DEFAULT), 'bar' => array('filter' => FILTER_DEFAULT)), false),
12    filter_var_array($data, array('foo' => array('filter' => FILTER_DEFAULT), 'bar' => array('filter' => FILTER_DEFAULT)))
13);
14
15?>
16--EXPECT--
17array(1) {
18  ["foo"]=>
19  string(3) "123"
20}
21array(2) {
22  ["foo"]=>
23  string(3) "123"
24  ["bar"]=>
25  NULL
26}
27