Home>Article>Backend Development> Parsing PHP data type objects (Object)

Parsing PHP data type objects (Object)

怪我咯
怪我咯 Original
2017-04-05 11:07:18 5220browse

ObjectInitialization

To create a new objectobject, useThe newstatement instantiates a class:

do_foo(); ?>

Convert to object

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn