RE: [PHP] new Object
| From: | Jon Haworth | Date: | Tue, 29 Apr 2003 13:16:40 +0000 |
| Subject: | RE: [PHP] new Object | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-145641@lists.php.net to get a copy of this message | ||
Hi Piotr,
> Just wondered what happens to an object when using
>
> // create object
> new Object;
>
> Is there any way to access it's methods/properties?
Yes, but you need to assign it to a variable when you create it, like this:
$foo = new Object;
And then you can use it like this:
$foo->doSomething();
echo $foo->someValue;
Cheers
Jon