1--TEST-- 2Test xml_parser_create_ns() function : error conditions 3--SKIPIF-- 4<?php 5if (!extension_loaded("xml")) { 6 print "skip - XML extension not loaded"; 7} 8?> 9--FILE-- 10<?php 11/* Prototype : proto resource xml_parser_create_ns([string encoding [, string sep]]) 12 * Description: Create an XML parser 13 * Source code: ext/xml/xml.c 14 * Alias to functions: 15 */ 16 17echo "*** Testing xml_parser_create_ns() : error conditions ***\n"; 18 19 20//Test xml_parser_create_ns with one more than the expected number of arguments 21echo "\n-- Testing xml_parser_create_ns() function with more than expected no. of arguments --\n"; 22$encoding = 'string_val'; 23$sep = 'string_val'; 24$extra_arg = 10; 25var_dump( xml_parser_create_ns($encoding, $sep, $extra_arg) ); 26 27echo "Done"; 28?> 29--EXPECTF-- 30*** Testing xml_parser_create_ns() : error conditions *** 31 32-- Testing xml_parser_create_ns() function with more than expected no. of arguments -- 33 34Warning: xml_parser_create_ns() expects at most 2 parameters, 3 given in %s on line %d 35bool(false) 36Done