我将方法声明为Variant:
Variant HHVM_METHOD(MyClass1, get) {
Object ob;
ob.o_set(s_PropertyName1, value1, s_MyClass2 );
ob.o_set(s_PropertyName1, value2, s_MyClass2 );
return Variant(ob);
}
PHP代码:
$c = new MyClass1();
var_dump($c->get()); // return StdClass
如何创建和返回MyClass2:
var_dump($c->get()); // must return MyClass2