Annotation of embedaddon/php/ext/filter/tests/025.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: filter_var() and FILTER_SANITIZE_STRING
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("filter")) die("skip"); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: var_dump(filter_var("", FILTER_SANITIZE_STRING));
! 9: var_dump(filter_var("<>", FILTER_SANITIZE_STRING));
! 10: var_dump(filter_var("<>!@#$%^&*()'\"", FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
! 11: var_dump(filter_var("<>!@#$%^&*()'\"", FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_AMP));
! 12: var_dump(filter_var("<>`1234567890", FILTER_SANITIZE_STRING));
! 13: var_dump(filter_var("`123`", FILTER_SANITIZE_STRING));
! 14: var_dump(filter_var(".", FILTER_SANITIZE_STRING));
! 15:
! 16: echo "Done\n";
! 17: ?>
! 18: --EXPECT--
! 19: string(0) ""
! 20: string(0) ""
! 21: string(12) "!@#$%^&*()'""
! 22: string(24) "!@#$%^&*()'""
! 23: string(11) "`1234567890"
! 24: string(5) "`123`"
! 25: string(1) "."
! 26: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>