Annotation of embedaddon/php/ext/filter/tests/bug50632.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: bug 50632, filter_input() does not return default value if the variable does not exist
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("filter")) die("skip"); ?>
! 5: --FILE--
! 6: <?php
! 7: $foo = filter_input(INPUT_GET, 'foo', FILTER_VALIDATE_INT, array('flags' => FILTER_REQUIRE_SCALAR, 'options' => array('default' => 23)));
! 8: var_dump($foo);
! 9: ?>
! 10: --EXPECT--
! 11: int(23)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>