1--TEST-- 2Test utf8_decode() function : error conditions 3--FILE-- 4<?php 5/* Prototype : proto string utf8_decode(string data) 6 * Description: Converts a UTF-8 encoded string to ISO-8859-1 7 * Source code: ext/standard/string.c 8 * Alias to functions: 9 */ 10 11echo "*** Testing utf8_decode() : error conditions ***\n"; 12 13// Zero arguments 14echo "\n-- Testing utf8_decode() function with Zero arguments --\n"; 15var_dump( utf8_decode() ); 16 17//Test utf8_decode with one more than the expected number of arguments 18echo "\n-- Testing utf8_decode() function with more than expected no. of arguments --\n"; 19$data = 'string_val'; 20$extra_arg = 10; 21var_dump( utf8_decode($data, $extra_arg) ); 22 23echo "Done"; 24?> 25--EXPECTF-- 26*** Testing utf8_decode() : error conditions *** 27 28-- Testing utf8_decode() function with Zero arguments -- 29 30Warning: utf8_decode() expects exactly 1 parameter, 0 given in %s on line %d 31NULL 32 33-- Testing utf8_decode() function with more than expected no. of arguments -- 34 35Warning: utf8_decode() expects exactly 1 parameter, 2 given in %s on line %d 36NULL 37Done 38