1--TEST-- 2Test xml_parser_create() 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([string encoding]) 12 * Description: Create an XML parser 13 * Source code: ext/xml/xml.c 14 * Alias to functions: 15 */ 16 17echo "*** Testing xml_parser_create() : error conditions ***\n"; 18 19 20//Test xml_parser_create with one more than the expected number of arguments 21echo "\n-- Testing xml_parser_create() function with more than expected no. of arguments --\n"; 22$encoding = 'utf-8'; 23$extra_arg = 10; 24var_dump( xml_parser_create($encoding, $extra_arg) ); 25 26echo "Done"; 27?> 28--EXPECTF-- 29*** Testing xml_parser_create() : error conditions *** 30 31-- Testing xml_parser_create() function with more than expected no. of arguments -- 32 33Warning: xml_parser_create() expects at most 1 parameter, 2 given in %s on line %d 34bool(false) 35Done 36