Annotation of embedaddon/php/ext/filter/tests/054.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: filter_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:
! 10: var_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--
! 17: array(1) {
! 18: ["foo"]=>
! 19: string(3) "123"
! 20: }
! 21: array(2) {
! 22: ["foo"]=>
! 23: string(3) "123"
! 24: ["bar"]=>
! 25: NULL
! 26: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>