1--TEST-- 2Test strip_tags() function : error conditions 3--INI-- 4short_open_tag = on 5--FILE-- 6<?php 7/* Prototype : string strip_tags(string $str [, string $allowable_tags]) 8 * Description: Strips HTML and PHP tags from a string 9 * Source code: ext/standard/string.c 10*/ 11 12 13echo "*** Testing strip_tags() : error conditions ***\n"; 14 15// Zero arguments 16echo "\n-- Testing strip_tags() function with Zero arguments --\n"; 17var_dump( strip_tags() ); 18 19//Test strip_tags with one more than the expected number of arguments 20echo "\n-- Testing strip_tags() function with more than expected no. of arguments --\n"; 21$str = "<html>hello</html>"; 22$allowable_tags = "<html>"; 23$extra_arg = 10; 24var_dump( strip_tags($str, $allowable_tags, $extra_arg) ); 25 26echo "Done"; 27?> 28--EXPECTF-- 29*** Testing strip_tags() : error conditions *** 30 31-- Testing strip_tags() function with Zero arguments -- 32 33Warning: strip_tags() expects at least 1 parameter, 0 given in %s on line %d 34NULL 35 36-- Testing strip_tags() function with more than expected no. of arguments -- 37 38Warning: strip_tags() expects at most 2 parameters, 3 given in %s on line %d 39NULL 40Done 41