>     non empty string converted to int = 0
 >     hense following is false:

actually is not accurate
php will try to do its best to convert string into int:
"php" != 1 however "1php" == 1

Alexei

On 12/02/2009 14:28, Chris Hope wrote:
> That's a better answer than mine. I forgot to mention about comparing
> booleans too. That manual page is really useful.
>
>
> 2009/2/12 Alexei Tenitski <[email protected] <mailto:[email protected]>>
>
>
>      > The following result in true:
>      > "php" == TRUE
>
>     non empty string converted to boolean = true
>     hense following is false:
>
>     "php" == FALSE
>
>
>      > "php" == 0
>
>     non empty string converted to int = 0
>     hense following is false:
>
>     "php" == 1
>
>     check out documentation about variable type conversion
>
>     http://nz.php.net/manual/en/language.types.type-juggling.php
>
>     Alexei
>
>
>
>
>
> --
> Chris Hope
> The Electric Toolbox Ltd
>
> Email: [email protected] <mailto:[email protected]>
> Web: www.electrictoolbox.com <http://www.electrictoolbox.com>
> Phone: +64 9 522 9531
> Mobile: +64 21 866 529
>
> >

--~--~---------~--~----~------------~-------~--~----~
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to