RE: [PHP4BETA] A quick clarification question about PHP4...
| From: | Samuel Liddicott | Date: | Wed, 01 Sep 1999 15:58:59 +0000 |
| Subject: | RE: [PHP4BETA] A quick clarification question about PHP4... | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-3976@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Andrey Zmievski [mailto:zmievski@ispi.net]
> Sent: Wednesday, September 01, 1999 04:42 PM
> To: Joey; Samuel Liddicott; Sander Pilon; zeev@zend.com
> Cc: Scott Stevenson; php4beta@lists.php.net
> Subject: Re: [PHP4BETA] A quick clarification question about PHP4...
>
>
> Samuel Liddicott wrote:
> > Something to do to a variable to make isset($var) return false again?
>
> That should be unset($var).
But not unset($var) as we just discussed that has significant OTHER effect
on static vars, and parameters.
It basically destroys the association of the "var" label to the value,
instead of assigning, er.. "undefined" to that variable and all &$ linked
variables.
#! /usr/bin/perl
$var="hello";
*var2=var;
print "$var2\n";
$var=undef;
print "$var2\n";
here $var2 is also looses its definition.
with unset($var) $var2 is intact; it is the label that is dissassociated,
and not <undef> value that is assigned.
At the moment assign an undefined variable will have the right effect, but
Zeev says this is a mistake and will vanish soon.
So... is there a php4 equivalent to
$var=undef;
that assigns <no_value> as apposed to destroying the association of the
label.
Sam