118 reputation
5
bio website
location Cedar Rapids, IA
age
visits member for 3 years, 10 months
seen Oct 27 at 16:29

Jan
31
awarded  Scholar
Jan
31
accepted Greater than or identical to?
Jan
28
awarded  Commentator
Jan
28
comment What features would you like to have in PHP?
empty() is the logical opposite of if ($x), so it makes sense that empty('0') is true, because if ('0') is false. The only difference is, empty() doesn't throw a notice if the variable isn't set.
Jan
28
comment What features would you like to have in PHP?
3 is right out, as PHP is a templating language.
Jan
28
comment What is happening to PHP 6?
Array dereferencing.
Jan
28
comment Greater than or identical to?
Thanks for the link and the answer. I personally use explicit typecasting only as a method for sanitizing for database input; if I know that the field expects an int, I can simply cast it to int rather than go through the escaping and quoting business. And yes, I try to avoid using === for numbers because sometimes a query or form might have inserted a numeric string into the process. Or, sometimes when I'm passing it to something expecting a boolean. But as you said, typecasting "down".
Jan
27
comment Greater than or identical to?
you said, "It seems that the hypothetical >== is doing two things... that is confusing and I don't like it." But the existing === does two things as well, in fact the same two things, does it not? Do you not like it either? :)
Jan
27
awarded  Supporter
Jan
27
comment Greater than or identical to?
@Frustrated, I don't understand your last comment.
Jan
27
awarded  Editor
Jan
27
revised Greater than or identical to?
rm php-specific language
Jan
27
comment Greater than or identical to?
Isn't === doing two things, though? It tests that the two operands are identical and, if they are, compares the values.
Jan
27
comment Greater than or identical to?
I see someone added a PHP tag; I disagree, as this is kind of language agnostic, as I don't see any weakly-typed language using this construction, and I was curious as to why not.
Jan
27
comment Greater than or identical to?
Right. It's not so much "are these greater than or identical", but rather, "is this greater than or equal to that, and of the same type?"
Jan
27
awarded  Student
Jan
27
asked Greater than or identical to?