ObjectInitialization
To create a new objectobject, useThe newstatement instantiates a class:
do_foo(); ?>
If you convert an object to an object, it will not change in any way. If a value of any other type is converted to an object, an instance of the built-in class stdClass will be created. If the value isNULL, the new instance is empty.ArrayConvert to object
使键名成为属性名并具有相对应的值。对于任何其它的值,名为 scalar 的成员变量将包含该值。 scalar; // outputs 'ciao' ?>
The above is the detailed content of Parsing PHP data type objects (Object). For more information, please follow other related articles on the PHP Chinese website!