At 08:48 PM 5/3/2001 -0400, David Croft wrote:
In my humble opinion 'null' is a 'pseudovalue' that has been made
available for some time. If it was never intended for a script to be able
to use it, it should never have been exposed. But it has been and many
people, myself included, are using
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,
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.
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
At 13:27 3/5/2001, Jani Taskinen wrote:
I just want to remind everyone that the 4.0.6 is suppose to have mainly
bug fixes..or wasn't this agreed on yet?
Yes it was.
Zeev
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
On Thu, 03 May 2001, Zeev Suraski wrote:
At 13:27 3/5/2001, Jani Taskinen wrote:
I just want to remind everyone that the 4.0.6 is suppose to have mainly
bug fixes..or wasn't this agreed on yet?
Yes it was.
Does that mean I should take my array_map() and array_filter() functions
out? ;-)
At 08:35 AM 5/3/2001 -0500, Andrei Zmievski wrote:
On Thu, 03 May 2001, Zeev Suraski wrote:
At 13:27 3/5/2001, Jani Taskinen wrote:
I just want to remind everyone that the 4.0.6 is suppose to have mainly
bug fixes..or wasn't this agreed on yet?
Yes it was.
Does that mean I should take
On Thu, 03 May 2001, Andi Gutmans wrote:
Nah but I think it means that you shouldn't add any more array_foobar()
functions before 4.0.7-dev :)
Geez, just when I finished array_foobar()..
By the way, what happened to that array_defined() or whatever function
which was added? Didn't we say
At 08:45 AM 5/3/2001 -0500, Andrei Zmievski wrote:
On Thu, 03 May 2001, Andi Gutmans wrote:
Nah but I think it means that you shouldn't add any more array_foobar()
functions before 4.0.7-dev :)
Geez, just when I finished array_foobar()..
:)
By the way, what happened to that
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..
-Andrei
* Power
At 16:46 3/5/2001, Andi Gutmans wrote:
By the way, what happened to that array_defined() or whatever function
which was added? Didn't we say it should be nuked? isset() and empty() are
enough IMO especially as NULL is used as undefined.
key_exists(), you mean? I didn't put it in, and as
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
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
At 08:53 AM 5/3/2001 -0500, Andrei Zmievski wrote:
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
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
Hmmm, looks like the MySQL module was changed to add NULL elements to the
array. It even looks as if you changed it :)
I intentionally removed the code that populated return values with NULL's,
to avoid inconsistencies. People should use the mysql_fetch_field() to
check which fields there
On Thu, 03 May 2001, Zeev Suraski wrote:
Hmmm, looks like the MySQL module was changed to add NULL elements to the
array. It even looks as if you changed it :)
I intentionally removed the code that populated return values with NULL's,
to avoid inconsistencies. People should use the
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
I very much agree with Andrei on this. Please, keep the
existing functionality.
Although, I'm not familiar with any issues possibly connected
with this. Does it hurt anything?
At 16:03 3.5. 2001, Andrei Zmievski wrote the following:
At 17:20 3/5/2001, Cynic wrote:
I very much agree with Andrei on this. Please, keep the
existing functionality.
Although, I'm not familiar with any issues possibly connected
with this. Does it hurt anything?
Yes, it requires adding of functions that duplicate isset()'s behavior in a
way that
On Thu, 03 May 2001, Zeev Suraski wrote:
Yes, it requires adding of functions that duplicate isset()'s behavior in a
way that may change in the future (implementation dependent).
What do you mean? You won't be able to store NULL's in the arrays?
-Andrei
* I don't mind going nowhere as long
On Thu, 3 May 2001, Zeev Suraski wrote:
At 17:20 3/5/2001, Cynic wrote:
I very much agree with Andrei on this. Please, keep the
existing functionality.
Although, I'm not familiar with any issues possibly connected
with this. Does it hurt anything?
Yes, it requires adding of functions that
At 10:43 AM 5/3/2001 -0400, Joe Brown wrote:
What about an isnull() function, opposed to key_exists();
IsPossible()?
Yeah that's definitely a possiblity but then you'd have to do something like.
if (isset($a[foo]) || isnull($a[foo))
Kind of sucky.
But we should think of a good resolution for a
No plans to do anything at this point. You can keep all your hairs in tact :)
Zeev
At 17:42 3/5/2001, Jani Taskinen wrote:
On Thu, 3 May 2001, Zeev Suraski wrote:
At 17:20 3/5/2001, Cynic wrote:
I very much agree with Andrei on this. Please, keep the
existing functionality.
Although,
RTFM :))
http://www.php.net/manual/en/html/function.is-null.html
At 16:47 3.5. 2001, Andi Gutmans wrote the following:
--
At 10:43 AM 5/3/2001 -0400, Joe Brown wrote:
What about an isnull() function, opposed to key_exists();
On Thu, 3 May 2001, Andi Gutmans wrote:
At 10:43 AM 5/3/2001 -0400, Joe Brown wrote:
What about an isnull() function, opposed to key_exists();
IsPossible()?
Yeah that's definitely a possiblity but then you'd have to do something like.
if (isset($a[foo]) || isnull($a[foo))
Kind of
If $a is undefined and you do is_null($a) I supposed you get true.
I was talking about a language construct which will give false in this case.
Anyway, it's not something I think we should change right now.
I think Andrei's MySQL patch should be reverted though. Many people are
doing
At 11:01 PM 5/2/2001 -0400, Sterling Hughes wrote:
IsAvailable()
[sterling@localhost standard]$ grep is_null *
basic_functions.c: PHP_FE(is_null,
first_arg_allow_ref)
basic_functions.c:/* {{{ proto bool is_null(mixed var)
basic_functions.c:PHP_FUNCTION(is_null)
On Thu, 03 May 2001, Andi Gutmans wrote:
Anyway, it's not something I think we should change right now.
I think Andrei's MySQL patch should be reverted though. Many people are
doing isset($row[foo]) on their MySQL query results. Today if foo is
NULL it will return false. If this is ever
At 10:17 AM 5/3/2001 -0500, Andrei Zmievski wrote:
On Thu, 03 May 2001, Andi Gutmans wrote:
Anyway, it's not something I think we should change right now.
I think Andrei's MySQL patch should be reverted though. Many people are
doing isset($row[foo]) on their MySQL query results. Today if
At 18:17 3/5/2001, Andrei Zmievski wrote:
Also, have you seen people complain about my patch to MySQL that adds
NULL's to the result set?
Sure. I just did. :)
Adding an isnull() language construct may be the right way to solve this
situation; key_exists() and the today's function is_null()
On Thu, 03 May 2001, Andi Gutmans wrote:
Also, have you seen people complain about my patch to MySQL that adds
NULL's to the result set?
No because isset() returns false for NULL values. But many people would
like it to return true, and then it would break people's scripts. I guess
at
On Thu, 03 May 2001, Zeev Suraski wrote:
Sure. I just did. :)
Adding an isnull() language construct may be the right way to solve this
situation; key_exists() and the today's function is_null() are both
functions that duplicate language-level functionality, and shouldn't exist
IMHO.
At 10:24 AM 5/3/2001 -0500, Andrei Zmievski wrote:
On Thu, 03 May 2001, Andi Gutmans wrote:
Also, have you seen people complain about my patch to MySQL that adds
NULL's to the result set?
No because isset() returns false for NULL values. But many people would
like it to return true, and
At 18:25 3/5/2001, Andrei Zmievski wrote:
On Thu, 03 May 2001, Zeev Suraski wrote:
Sure. I just did. :)
Adding an isnull() language construct may be the right way to solve this
situation; key_exists() and the today's function is_null() are both
functions that duplicate language-level
On Thu, 03 May 2001, Andi Gutmans wrote:
How do you know today if it's NULL or not?
is_null()?
-Andrei
We all have photographic memories, it's just
that some of us don't have any film.
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
At 10:38 AM 5/3/2001 -0500, Andrei Zmievski wrote:
On Thu, 03 May 2001, Andi Gutmans wrote:
How do you know today if it's NULL or not?
is_null()?
is_null() will also return true if it's undefined.
Andi
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL
is_null() should return false if a variable is not set.
isset() should be used to test for variables existance, not is_null().
This is my opinion and I'm sticking to it. Those whom deviate from my
opinion are wrong in my opinion!!!
-Joe
Andi Gutmans [EMAIL PROTECTED] wrote in message
[EMAIL
At 01:04 PM 5/3/2001 -0400, Joe Brown wrote:
is_null() should return false if a variable is not set.
Well it doesn't. There ya go :)
isset() should be used to test for variables existance, not is_null().
This is my opinion and I'm sticking to it. Those whom deviate from my
opinion are wrong
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
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
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
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
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
On Thu, 3 May 2001, Andi Gutmans wrote:
At 08:53 AM 5/3/2001 -0500, Andrei Zmievski wrote:
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
In my humble opinion 'null' is a 'pseudovalue' that has been made
available for some time. If it was never intended for a script to be able
to use it, it should never have been exposed. But it has been and many
people, myself included, are using it.
It is particularly useful to mark a value
46 matches
Mail list logo