Introduction: This is a detailed page of stdclass in PhP5. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 338278 'rolling = 'no'>
Stdclass added in PhP5
Official reference: http://www.php.net/manual/en/language.oop5.basic.php#92123
The stdclass class is an internal reserved class of PHP. It has no member variables or member methods at the beginning, and all magic methods are set to null. You can use it to pass variable parameters, however, there are no methods that can be called. The stdclass class can be inherited, but it makes no sense to do so.
This class is a reserved PHP class, not the base class of all classes.
<? Phpclass Foo {}$ bar = new Foo (); echo $ bar instanceof stdclass? 'Yes': 'no'; // output: No
Another example:
<? PHP // ctest does not derive from stdclassclass ctest {public $ property1;} $ T = new ctest; var_dump ($ t instanceof stdclass); // falsevar_dump (is_subclass_of ($ t, 'stdclass'); // falseecho get_class ($ T ). "\ n"; // 'ctest' echo get_parent_class ($ T ). "\ n"; // false (no parent)?>
Any forced conversion with (object) will get an instance of stdclass.
Refer:
Http://www.phppan.com/2011/05/php-stdclass/
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/338278.html pageno: 9.