将数组转换为对象删除标准类

Hi i need to convert array to object.

So i use :

$object = (object)$array;

But my problem is i have not the same object. In my current object i have :

class Proxies\__CG__\...#1142 (25) { my object...

And when i convert array to string i have :

class stdClass#1394 (1) {


public ${0} =>


class Proxies\__CG__\...#1142 (25) { my object...

How i can to delete the class std and public 0 ?