xref: /php-src/ext/filter/tests/012.phpt (revision fca9e23a)
1--TEST--
2filter_input()
3--EXTENSIONS--
4filter
5--FILE--
6<?php
7
8var_dump(filter_input(INPUT_GET, "test"));
9var_dump(filter_input(INPUT_POST, "test"));
10var_dump(filter_input(INPUT_COOKIE, ""));
11
12var_dump(filter_input(INPUT_GET, "test", FILTER_DEFAULT, FILTER_NULL_ON_FAILURE));
13var_dump(filter_input(INPUT_POST, "test", FILTER_DEFAULT, FILTER_NULL_ON_FAILURE));
14var_dump(filter_input(INPUT_COOKIE, "", FILTER_DEFAULT, FILTER_NULL_ON_FAILURE));
15
16echo "Done\n";
17?>
18--EXPECT--
19NULL
20NULL
21NULL
22bool(false)
23bool(false)
24bool(false)
25Done
26