[UPHPU] simple question

thin thinbegin at gmail.com
Wed Apr 21 15:20:59 MDT 2010


you could use the gettype() function or use var_dump() on the variable
to hopefully shed some light on your question. i remember these types
of questions only becoming clear for me by rigorous playing around
with the variable type :)



On Wed, Apr 21, 2010 at 3:12 PM, Merrill Oveson <moveson at gmail.com> wrote:
> I have the following code:
>
> function writePriv ($x) {
>    if ($y== 0) {
>       return TRUE;
>    } else {
>       return FALSE;
>    }
>
> }
>
>  $writePriv = writePriv('w');
>  if ($writePriv == FALSE) { print "false!!!"; }
>  print "<br /> write priv is $writePriv";
>
>
> The output is:
>
> false!!!
> write priv is
>
> ______________
> When writePriv returns TRUE
> the output is:
>
> write priv is 1.
>
>
> My question: why when the function returns FALSE, don't I get a 0 (zero)?
>
> Thanks
>
> Merrill
>
> _______________________________________________
>
> UPHPU mailing list
> UPHPU at uphpu.org
> http://uphpu.org/mailman/listinfo/uphpu
> IRC: #uphpu on irc.freenode.net
>


More information about the UPHPU mailing list