If not construct

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zardiw
Forum Newbie
Posts: 8
Joined: Mon Oct 29, 2007 11:29 pm

If not construct

Post by zardiw »

I would like to use this, but don't know if it's allowed:

Code: Select all

If !($a == $b) 


or do I have to use:

If ($a !== $b)


z
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

fastest way is to try it ;-)

Also, the two examples don't equate (even if they both worked, which they don't)
http://php.net/manual/en/language.opera ... arison.php
rung
Forum Newbie
Posts: 3
Joined: Tue Oct 30, 2007 10:04 pm

Post by rung »

Code: Select all

!($a == $b)
is the equivalent of

Code: Select all

($a != $b)
Post Reply