Hey!
I'd like to cast a string "false" to a boolean.
So I tried the following:
<?php
$var = (bool)"false";
var_dump ($var);
?>
Here var_dump gives me:
bool(true)
I also tried using settype:
<?php
$var = "false";
settype ($var, "bool");
var_dump ($var);
?>
The same result here:
bool(true);
So is there a way to cast such a string to a boolean (without using
conditions)?
Cheers,
Jay
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php