RE: [PHP] Deleting Objects

2003-04-02 Thread John Coggeshall
ll Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Deleting Objects Not exactly true. unset() destroys the reference to the value, not the value itself. For instance, error_reporting(E_ALL); $var1 = "foo"; $var2 = &$var1; print "$var1\n$var2\n\n"; unset($var1)

Re: [PHP] Deleting Objects

2003-04-02 Thread Leif K-Brooks
Not exactly true. unset() destroys the reference to the value, not the value itself. For instance, error_reporting(E_ALL); $var1 = "foo"; $var2 = &$var1; print "$var1\n$var2\n\n"; unset($var1); print "$var1\n$var2"; will output: foo foo Notice: Undefined variable: var1 in PHPDocument1 on li

RE: [PHP] Deleting Objects

2003-04-02 Thread John Coggeshall
dot org http://www.coggeshall.org/ -~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~- >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: Thursday, April 03, 2003 12:07 AM >To: [EMAIL PROTECTED] >Subject: [PHP] Deleting Obj

Re: [PHP] Deleting Objects

2003-04-02 Thread Leif K-Brooks
That will work perfectly. [EMAIL PROTECTED] wrote: How does one delete an object? For example: $object = new Class(...); . $object = new Class(...); I want to throw away the old object and create a new, freshly initialized one using the same variable. Is the above

[PHP] Deleting Objects

2003-04-02 Thread trlists
How does one delete an object? For example: $object = new Class(...); . $object = new Class(...); I want to throw away the old object and create a new, freshly initialized one using the same variable. Is the above adequate or will this orphan the first object? If