Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV]Re: [PHP-QA] Re: [PHP-DEV] Release process

2001-05-04 Thread Sterling Hughes

On Fri, 4 May 2001, Zeev Suraski wrote:

> At 17:30 4/5/2001, Joe Brown wrote:
> >Question:
> >Is is_null() an alias for isset()?
> >
> >Based on this statement and my understanding of both funcitons, it should
> >be.
>
> No it's not, it's a function.  As such, it cannot detect whether a variable
> exists and has a null value, or is undefined completely.
>

It can if you use it like I have been:

function whatever()
{
$var = NULL;

if (is_null($var)) {
echo "variable is null";
}
}

I'm a bit crazy, so I pre-assign a lot of my variables at the top of my
functions (I never could really get used to not pre-declaring
variables)...

-Sterling


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Release process

2001-05-04 Thread Zeev Suraski

At 17:30 4/5/2001, Joe Brown wrote:
>Question:
>Is is_null() an alias for isset()?
>
>Based on this statement and my understanding of both funcitons, it should
>be.

No it's not, it's a function.  As such, it cannot detect whether a variable 
exists and has a null value, or is undefined completely.

Zeev


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Release process

2001-05-04 Thread Joe Brown

Question:
Is is_null() an alias for isset()?

Based on this statement and my understanding of both funcitons, it should
be.

"Andi Gutmans" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 07:02 PM 5/3/2001 -0500, Andrei Zmievski wrote:
> >At 06:31 PM 5/3/01 -0500, Richard Lynch wrote:
> >>Um, lots of people use isset($row['foo]) to detect NULL in the
database...
> >>
> >>Are you going to change that behaviour?
> >>
> >>Don't.
> >>
> >>If the column is missing, they screwed up their SQL, which is not within
the
> >>pervue of PHP to fix in the first place...
> >
> >You are arguing my point, Richard.
>
> Andrei,
>
> Not exactly. No matter if it is set to NULL or unset then isset() will
give
> the same result.
> And most people use isset() AFAIK.
> Andi
>
>
> --
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Release process

2001-05-03 Thread Andi Gutmans

At 07:16 PM 5/3/2001 -0500, Andrei Zmievski wrote:
>At 03:14 AM 5/4/01 +0300, Andi Gutmans wrote:
>>Not exactly. No matter if it is set to NULL or unset then isset() will 
>>give the same result.
>>And most people use isset() AFAIK.
>
>Whatever the current situation, there needs to be a way to check whether a 
>certain array entry is NULL or not.

If so then we need to make sure that modules like the MySQL module still 
continue to behave exactly like they used to with isset() and other ways 
programmers were working.
I'm not saying you're wrong. It's probably a good idea but we need to think 
about the consequences and other changes we might need to make at the same 
time before breaking stuff.
We should probably save all of the NULL stuff for 4.1.x. If we do it the 
right way we might end up breaking certain scripts.

Andi


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Release process

2001-05-03 Thread Andrei Zmievski

At 03:14 AM 5/4/01 +0300, Andi Gutmans wrote:
>Not exactly. No matter if it is set to NULL or unset then isset() will 
>give the same result.
>And most people use isset() AFAIK.

Whatever the current situation, there needs to be a way to check whether a 
certain array entry is NULL or not.

-Andrei


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Release process

2001-05-03 Thread Andi Gutmans

At 07:02 PM 5/3/2001 -0500, Andrei Zmievski wrote:
>At 06:31 PM 5/3/01 -0500, Richard Lynch wrote:
>>Um, lots of people use isset($row['foo]) to detect NULL in the database...
>>
>>Are you going to change that behaviour?
>>
>>Don't.
>>
>>If the column is missing, they screwed up their SQL, which is not within the
>>pervue of PHP to fix in the first place...
>
>You are arguing my point, Richard.

Andrei,

Not exactly. No matter if it is set to NULL or unset then isset() will give 
the same result.
And most people use isset() AFAIK.
Andi


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] Release process

2001-05-03 Thread Andrei Zmievski

At 06:31 PM 5/3/01 -0500, Richard Lynch wrote:
>Um, lots of people use isset($row['foo]) to detect NULL in the database...
>
>Are you going to change that behaviour?
>
>Don't.
>
>If the column is missing, they screwed up their SQL, which is not within the
>pervue of PHP to fix in the first place...

You are arguing my point, Richard.

-Andrei


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]