Unknown Syntax

This is a discussion on Unknown Syntax within the PHP General forums, part of the PHP Programming Forums category; Does anybody recognize this: !== with 2 '=' Ive known != to mean not equal to but i'm just looking at someone ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-11-2003
Chris Morrow
 
Posts: n/a
Default Unknown Syntax

Does anybody recognize this:

!==

with 2 '='

Ive known != to mean not equal to but i'm just looking at someone elses
script and they use this instead. Does anyone know if this works or any
problems with it?

Cheers


Reply With Quote
  #2 (permalink)  
Old 07-11-2003
Erythros
 
Posts: n/a
Default Re: Unknown Syntax

two equal signs means 'equal to'
so '!==' means 'not equal to'
one equal sign sets a value.
ie...
x = 2; // x is set to the value of 2

if(x!==3) // checks if the value of x is not equal to 3

as for != i've never seen it with just one equal sign...


"Chris Morrow" <chris.morrow@btopenworld.com> wrote in message
news:20030711125539.71628.qmail@pb1.pair.com...
> Does anybody recognize this:
>
> !==
>
> with 2 '='
>
> Ive known != to mean not equal to but i'm just looking at someone elses
> script and they use this instead. Does anyone know if this works or any
> problems with it?
>
> Cheers
>
>



Reply With Quote
  #3 (permalink)  
Old 07-11-2003
Chris Morrow
 
Posts: n/a
Default Re: Unknown Syntax

I Found this on the PHP.net site, maybe it will clear things up. Thanks for
your help everyone.

Example Name Result
$a == $b Equal TRUE if $a is equal to $b.
$a === $b Identical TRUE if $a is equal to $b, and they are of the
same type. (PHP 4 only)
$a != $b Not equal TRUE if $a is not equal to $b.
$a <> $b Not equal TRUE if $a is not equal to $b.
$a !== $b Not identical TRUE if $a is not equal to $b, or they are not
of the same type. (PHP 4 only)
$a < $b Less than TRUE if $a is strictly less than $b.
$a > $b Greater than TRUE if $a is strictly greater than $b.
$a <= $b Less than or equal to TRUE if $a is less than or equal to
$b.
$a >= $b Greater than or equal to TRUE if $a is greater than or equal
to $b.


Cheers,
Chris


"Erythros" <erythros@erythros.com> wrote in message
news:20030711131515.92921.qmail@pb1.pair.com...
> two equal signs means 'equal to'
> so '!==' means 'not equal to'
> one equal sign sets a value.
> ie...
> x = 2; // x is set to the value of 2
>
> if(x!==3) // checks if the value of x is not equal to 3
>
> as for != i've never seen it with just one equal sign...
>
>
> "Chris Morrow" <chris.morrow@btopenworld.com> wrote in message
> news:20030711125539.71628.qmail@pb1.pair.com...
> > Does anybody recognize this:
> >
> > !==
> >
> > with 2 '='
> >
> > Ive known != to mean not equal to but i'm just looking at someone elses
> > script and they use this instead. Does anyone know if this works or any
> > problems with it?
> >
> > Cheers
> >
> >

>
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:29 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0