note 84441 deleted from class.domnodelist by joey
| From: | joey@php.net | Date: | Tue, 16 Oct 2012 00:54:52 +0000 |
| Subject: | note 84441 deleted from class.domnodelist by joey | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191313@lists.php.net to get a copy of this message | ||
Note Submitter: rohypnol
----
That's simply because up to and including PHP 5 (latest version at this time) you can't
use a function result as an object even if it is an object.
Work:
1) $obj->sub_obj->method();
2) $sub_obj = $obj->get_sub_obj();
$sub_obj->method();
Don't work:
1) $obj->get_sub_obj()->method();
2) echo $obj->get_sub_obj()->property;