php建立空对象的几个方法
方法一:
$object = new stdClass;
方法二:
$object = json_decode('{}');
方法三:
$object = (object)[];
方法四:
$object = (object) null;
方法五:
class object{ } $object = new object();
方法一:
$object = new stdClass;
方法二:
$object = json_decode('{}');
方法三:
$object = (object)[];
方法四:
$object = (object) null;
方法五:
class object{ } $object = new object();