开发者

stdClass object information PHP

开发者 https://www.devze.com 2022-12-20 01:53 出处:网络
there\'s this stdClass thing in PHP: <?php $fakeobj-&g开发者_如何学Ct;hi = \"o\"; echo $fakeobj->hi;

there's this stdClass thing in PHP:

<?php
$fakeobj-&g开发者_如何学Ct;hi = "o";
echo $fakeobj->hi;

See? Is this php4?


StdClass is present in php 4 and 5. Its not necessarily either - its just a basic class implementation with no methods - a value object. Its used by some functions when they need to generate an object without an explicit user defined class for example json_decode or a value object returned by a SOAP request when a class isnt explicitly mapped. Of course a user/developer can also use it.

0

精彩评论

暂无评论...
验证码 换一张
取 消