Source Code:
(back to article)
<?php if(isset($obj)){ $obj->name = "John"; }else{ $obj = new stdClass(); $obj->name = "John"; } echo $obj->name; // Output: // John ?>
Result:
Report an issue