xref: /PHP-7.1/ext/filter/tests/009.phpt (revision 7af945e2)
1--TEST--
2filter_id()
3--SKIPIF--
4<?php if (!extension_loaded("filter")) die("skip"); ?>
5--FILE--
6<?php
7
8var_dump(filter_id("stripped"));
9var_dump(filter_id("string"));
10var_dump(filter_id("url"));
11var_dump(filter_id("int"));
12var_dump(filter_id("none"));
13var_dump(filter_id(array()));
14var_dump(filter_id(-1));
15var_dump(filter_id(0,0,0));
16
17echo "Done\n";
18?>
19--EXPECTF--
20int(513)
21int(513)
22int(518)
23int(257)
24bool(false)
25
26Warning: filter_id() expects parameter 1 to be string, array given in %s on line %d
27NULL
28bool(false)
29
30Warning: filter_id() expects exactly 1 parameter, 3 given in %s on line %d
31NULL
32Done
33