Re: interface problem in PHP5
| From: | Torsten Roehr | Date: | Sun, 05 Sep 2004 15:49:27 +0000 |
| Subject: | Re: interface problem in PHP5 | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195921@lists.php.net to get a copy of this message | ||
"Erik franzén" <erik@nordicaudi.com> wrote in message
news:20040904220129.90382.qmail@pb1.pair.com...
> If you want to delete an object, when you have other references to it,
> you must use the & operator, otherwise the object will not be killed for
> all references.
>
> I tested without the &-operator, but that did not work
>
> The &-operator is still important in PHP5. Look at the folling example
>
> <?
> $a = new stdclass;
> $b = $a;
> $c =& $a;
> ?>
>
> unsetting a will only kill a, b and c will still be "alive".
> setting a to null will kill c but not b
>
> /Erik
OK, but what about your interface problem? Could you solve it with this?:
>>>
I think you have to also define the arguments you want to use for item() in
your interface:
function item($a_iIndex);
<<<
Regards, Torsten Roehr