1--TEST-- 2Test stripcslashes() function : error conditions 3--FILE-- 4<?php 5 6/* Prototype : string stripcslashes ( string $str ) 7 * Description: Returns a string with backslashes stripped off. Recognizes C-like \n, \r ..., 8 * octal and hexadecimal representation. 9 * Source code: ext/standard/string.c 10*/ 11 12echo "*** Testing stripcslashes() : unexpected number of arguments ***"; 13 14 15echo "\n-- Testing stripcslashes() function with no arguments --\n"; 16var_dump( stripcslashes() ); 17 18echo "\n-- Testing stripcslashes() function with more than expected no. of arguments --\n"; 19$extra_arg = 10; 20var_dump( stripcslashes("abc def", $extra_arg) ); 21?> 22===DONE=== 23--EXPECTF-- 24*** Testing stripcslashes() : unexpected number of arguments *** 25-- Testing stripcslashes() function with no arguments -- 26 27Warning: stripcslashes() expects exactly 1 parameter, 0 given in %s on line %d 28NULL 29 30-- Testing stripcslashes() function with more than expected no. of arguments -- 31 32Warning: stripcslashes() expects exactly 1 parameter, 2 given in %s on line %d 33NULL 34===DONE=== 35