--TEST-- Test get_object_vars() function : usage variations - unexpected types for argument 1 --FILE-- 'red', 'item' => 'pen'), // null data NULL, null, // boolean data true, false, TRUE, FALSE, // empty data "", '', // string data "string", 'string', // 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( get_object_vars($value) ); }; echo "Done"; ?> --EXPECTF-- *** Testing get_object_vars() : usage variations *** Notice: Undefined variable: undefined_var in %s on line 56 Notice: Undefined variable: unset_var in %s on line 59 Arg value 0 Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d NULL Arg value 1 Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d NULL Arg value 12345 Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d NULL Arg value -2345 Warning: get_object_vars() expects parameter 1 to be object, integer given in %s on line %d NULL Arg value 10.5 Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d NULL Arg value -10.5 Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d NULL Arg value 101234567000 Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d NULL Arg value 1.07654321E-9 Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d NULL Arg value 0.5 Warning: get_object_vars() expects parameter 1 to be object, float given in %s on line %d NULL Arg value Array Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d NULL Arg value Array Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d NULL Arg value Array Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d NULL Arg value Array Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d NULL Arg value Array Warning: get_object_vars() expects parameter 1 to be object, array given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d NULL Arg value 1 Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d NULL Arg value 1 Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, boolean given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d NULL Arg value string Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d NULL Arg value string Warning: get_object_vars() expects parameter 1 to be object, string given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d NULL Arg value Warning: get_object_vars() expects parameter 1 to be object, null given in %s on line %d NULL Done