Click here to get back home

Triple Equals ===

 HomeNewsGroups | Search | About
 comp.lang.php    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Triple Equals === Twayne 07-28-2008
Get Chitika Premium
Posted by Twayne on July 28, 2008, 2:18 pm
Please log in for more thread options

Silly question time maybe: But it looks like, from a little playing,
that "===" may be able to replace "if isset"? It apparently only
returns true of the input box exists, and has been filled in?

Just curious; only played with it, not used it a lot yet; thought I'd
see what you guys thought of it first.

TIA,

Twayne



Posted by Jerry Stuckle on July 28, 2008, 3:16 pm
Please log in for more thread options
Twayne wrote:
> Silly question time maybe: But it looks like, from a little playing,
> that "===" may be able to replace "if isset"? It apparently only
> returns true of the input box exists, and has been filled in?
>
> Just curious; only played with it, not used it a lot yet; thought I'd
> see what you guys thought of it first.
>
> TIA,
>
> Twayne
>
>
>

It will produce an E_NOTICE if the variable is not set.

That's why there is isset().

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================


Posted by Michael Fesser on July 28, 2008, 3:18 pm
Please log in for more thread options
.oO(Twayne)

>Silly question time maybe: But it looks like, from a little playing,
>that "===" may be able to replace "if isset"? It apparently only
>returns true of the input box exists, and has been filled in?

'===' is the same as '==', but also performs a type check. Using it on
a non-existing variable will still cause an E_NOTICE error (check your
error_reporting if necessary, make sure it's set to E_ALL or even
E_ALL|E_STRICT).

Micha

Posted by Twayne on July 28, 2008, 4:58 pm
Please log in for more thread options
> Silly question time maybe: But it looks like, from a little playing,
> that "===" may be able to replace "if isset"? It apparently only
> returns true of the input box exists, and has been filled in?
>
> Just curious; only played with it, not used it a lot yet; thought I'd
> see what you guys thought of it first.
>
> TIA,
>
> Twayne

Thank you both; the devil is always in the details<g>. E_STRICT is news
to me for some reason; I'll go check what it's about asap.

Thanks much,

Twayne



Posted by Erwin Moller on July 29, 2008, 4:28 am
Please log in for more thread options
Twayne schreef:
>> Silly question time maybe: But it looks like, from a little playing,
>> that "===" may be able to replace "if isset"? It apparently only
>> returns true of the input box exists, and has been filled in?
>>
>> Just curious; only played with it, not used it a lot yet; thought I'd
>> see what you guys thought of it first.
>>
>> TIA,
>>
>> Twayne
>
> Thank you both; the devil is always in the details<g>. E_STRICT is news
> to me for some reason; I'll go check what it's about asap.

E_STRICT is also relatively new to the language. ;-)

Regards,
Erwin Moller

>
> Thanks much,
>
> Twayne
>
>

Similar ThreadsPosted
Echo versus Question Mark Equals August 6, 2007, 4:05 pm
mail sent by php to outlook missing two characters after every equals sign September 11, 2004, 7:46 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap