xref: /PHP-7.3/ext/filter/tests/bug50632.phpt (revision 782352c5)
1--TEST--
2bug 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)));
8var_dump($foo);
9?>
10--EXPECT--
11int(23)
12