Posted by Schraalhans Keukenmeester on 05/24/07 13:08
At Thu, 24 May 2007 06:00:04 -0700, Luigi let his monkeys type:
> Hi to all,
> I' d like to know if exists some sentences like this one below (in
> java) for PHP:
>
> JAVA:
> boolean isNull = (myObj == null) ? true : false;
>
> PHP:
> $isNull = ???????????????;
>
> Can someone help me please?
>
> Thanks in advance, Luigi
$isNull = ($myObj === null) ? true : false;
== asserts A has the same value as B (implicit cast if required/possible)
=== asserts A has the same type and value as B (no cast)
$A = true;
$B = 1;
if ($A == $B) => true;
if ($A === $B) => false;
HTH
Sh.
[Back to original message]
|