Annotation of embedaddon/php/ext/filter/tests/023.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: filter_var() and FILTER_UNSAFE_RAW
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("filter")) die("skip"); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: var_dump(filter_var("}\"<p>test para</p>", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP));
! 9: var_dump(filter_var("a[!@#<b>$%^&*()@a@#$%^&*(.<br>com@#$%^&*(", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP));
! 10: var_dump(filter_var("white space here \ \ \" some more", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP));
! 11: var_dump(filter_var("", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP));
! 12: var_dump(filter_var(" 123456789000000 <qwertyuiop> ", FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_AMP));
! 13:
! 14: echo "Done\n";
! 15: ?>
! 16: --EXPECT--
! 17: string(18) "}"<p>test para</p>"
! 18: string(53) "a[!@#<b>$%^&*()@a@#$%^&*(.<br>com@#$%^&*("
! 19: string(32) "white space here \ \ " some more"
! 20: string(0) ""
! 21: string(48) " 123456789000000 <qwertyuiop> "
! 22: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>