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)
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
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
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
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
5 matches
Mail list logo