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 http://www.php.net/
 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 http://www.php.net/
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 http://www.php.net/
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 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 http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 Cynic

Err, as you say, PHP should make things easy. I don't see how
making tell NULL from an undefined variable makes anything 
easier.


At 15:49 3.5. 2001, Andi Gutmans wrote the following:
-- 
At 08:48 AM 5/3/2001 -0500, Andrei Zmievski wrote:
On Thu, 03 May 2001, Andi Gutmans wrote:
 key_exists(), you mean? I didn't put it in, and as far as I know it's
 still there.

 I'd really like to nuke it.

I can sort of see his point really, if $array['foo'] = NULL there is no
way to know whether key 'foo' exists or not..

Yeah but I'm afraid it'll make scripts be written on behavior which shouldn't be 
counted on.
Maybe in future versions of Zend $array['foo'] won't be defined. There are certain 
situations where I think it was impossible to not define it so it was defined with 
NULL meaning it's not defined.

Andi


-- 
PHP Quality Assurance Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--end of quote-- 


[EMAIL PROTECTED]
-
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7 


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 Cynic

insert impossible somewhere in the sentence to make it 
make sense.

At 16:04 3.5. 2001, Cynic wrote the following:
-- 
Err, as you say, PHP should make things easy. I don't see how
making tell NULL from an undefined variable makes anything 
easier.


At 15:49 3.5. 2001, Andi Gutmans wrote the following:
-- 
At 08:48 AM 5/3/2001 -0500, Andrei Zmievski wrote:
On Thu, 03 May 2001, Andi Gutmans wrote:
 key_exists(), you mean? I didn't put it in, and as far as I know it's
 still there.

 I'd really like to nuke it.

I can sort of see his point really, if $array['foo'] = NULL there is no
way to know whether key 'foo' exists or not..

Yeah but I'm afraid it'll make scripts be written on behavior which shouldn't be 
counted on.
Maybe in future versions of Zend $array['foo'] won't be defined. There are certain 
situations where I think it was impossible to not define it so it was defined with 
NULL meaning it's not defined.

Andi


-- 
PHP Quality Assurance Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--end of quote-- 


[EMAIL PROTECTED]
-
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7 


-- 
PHP Quality Assurance Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--end of quote-- 


[EMAIL PROTECTED]
-
And the eyes of them both were opened and they saw that their files
were world readable and writable, so they chmoded 600 their files.
- Book of Installation chapt 3 sec 7 


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[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 Richard Lynch

 On Thu, 03 May 2001, Andi Gutmans wrote:
  Yeah but I'm afraid it'll make scripts be written on behavior which
  shouldn't be counted on.
  Maybe in future versions of Zend $array['foo'] won't be defined. There
are
  certain situations where I think it was impossible to not define it so
it
  was defined with NULL meaning it's not defined.

 Um, but some db extensions return NULL values as part of the array, so
 if column 'foo' is NULL in the db, you'd want the result array to have
 NULL under key 'foo' - it just won't do to have that column be missing.

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...

--
WARNING [EMAIL PROTECTED] address is not working -- Use [EMAIL PROTECTED]
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm



-- 
PHP Development Mailing List http://www.php.net/
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 http://www.php.net/
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 http://www.php.net/
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 http://www.php.net/
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 http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]