xref: /PHP-5.6/ext/filter/tests/054.phpt (revision 118695a4)
1--TEST--
2filter_var_array() - using the add_empty option
3--SKIPIF--
4<?php if (!extension_loaded("filter")) die("skip"); ?>
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