我需要将对象的类型从 stdClass 更改为“myClass”,就像 PDO::fetch_object("myClass");
$inc = new stdClass;
$inc = funct_for_set_type_of_object("myClass"); // here the function to do
// namespace conversion
echo get_class($inc);
预期结果:myClass
我需要像上面这样的函数:“get_class”,但具有像“set_class”这样的行为。