Jump to content

Archived

This topic is now archived and is closed to further replies.

newb

difference between !== and ==!

Recommended Posts

=== or !== is a strict comparison....to compare both the value AND the variable type

== or != is a basic comparison....to compare just the value


for instance

[code=php:0]
var_dump(false == 0); //displays true
var_dump(false !=== 0); //displays false
[/code]

Share this post


Link to post
Share on other sites
i didnt ask the difference between !== and !=...

i asked the difference between !== and ==!... lol.

Share this post


Link to post
Share on other sites
[quote author=newb link=topic=110714.msg448207#msg448207 date=1160162402]
i didnt ask the difference between !== and !=...

i asked the difference between !== and ==!... lol.
[/quote]

well, !== is explained above, and ==! isn't a PHP operator at all

Share this post


Link to post
Share on other sites
but i used it before and it worked as if i was using !== :/

Share this post


Link to post
Share on other sites
i cant think of any reason why you'd need to use ==! as the whole logic of it is a little mindblowing.

this would mean $a not equal to $b:
$a!==$b

this would mean $a equal to not $b. so if $b is set, or true, !$b = false . if $b not set or is false, $!b = true
$a==!$b

Share this post


Link to post
Share on other sites
that is madness man what the hel is that ==!

incorrect read the above information there is not a operator like that in the world for php you might of used it but it's not doing nothink wast of code.

your making your own php code up lol

who in there right mind would say this example

a equal not b what?
$a==!b;

you blow my mind lol...................

Share this post


Link to post
Share on other sites
lol if it works and doesnt throw an error, then technically its perfectly valid syntax...i even (sadly) went and had a play around with it. i can safely say that it'll never end up in anything i ever do :)

Share this post


Link to post
Share on other sites
Hmm... I think this is about done.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.