--TEST-- Test xml_set_object() function : usage variations --SKIPIF-- --FILE-- 'red', 'item' => 'pen'), // null data NULL, null, // boolean data true, false, TRUE, FALSE, // empty data "", '', // string data "string", 'string', // resource data $fp, // undefined data $undefined_var, // unset data $unset_var, ); // loop through each element of the array for obj foreach($values as $value) { echo @"\nArg value $value \n"; var_dump( xml_set_object($parser, $value) ); }; xml_parser_free($parser); fclose($fp); echo "Done"; ?> --EXPECTF-- *** Testing xml_set_object() : usage variations *** Arg value 0 Warning: xml_set_object() expects parameter 2 to be object, integer given in %s on line %d NULL Arg value 1 Warning: xml_set_object() expects parameter 2 to be object, integer given in %s on line %d NULL Arg value 12345 Warning: xml_set_object() expects parameter 2 to be object, integer given in %s on line %d NULL Arg value -2345 Warning: xml_set_object() expects parameter 2 to be object, integer given in %s on line %d NULL Arg value 10.5 Warning: xml_set_object() expects parameter 2 to be object, double given in %s on line %d NULL Arg value -10.5 Warning: xml_set_object() expects parameter 2 to be object, double given in %s on line %d NULL Arg value 101234567000 Warning: xml_set_object() expects parameter 2 to be object, double given in %s on line %d NULL Arg value 1.07654321E-9 Warning: xml_set_object() expects parameter 2 to be object, double given in %s on line %d NULL Arg value 0.5 Warning: xml_set_object() expects parameter 2 to be object, double given in %s on line %d NULL Arg value Array Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d NULL Arg value Array Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d NULL Arg value Array Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d NULL Arg value Array Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d NULL Arg value Array Warning: xml_set_object() expects parameter 2 to be object, array given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d NULL Arg value 1 Warning: xml_set_object() expects parameter 2 to be object, boolean given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, boolean given in %s on line %d NULL Arg value 1 Warning: xml_set_object() expects parameter 2 to be object, boolean given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, boolean given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d NULL Arg value string Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d NULL Arg value string Warning: xml_set_object() expects parameter 2 to be object, string given in %s on line %d NULL Arg value Resource id %s Warning: xml_set_object() expects parameter 2 to be object, resource given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d NULL Arg value Warning: xml_set_object() expects parameter 2 to be object, null given in %s on line %d NULL Done