Stefan: Seems like your post was deleted.
( talked about converting to float and bool )
Couldn't you work it out with type() ?
PHP Code:
function eval( var )
{
switch( var.type() )
{
case 0:
return var != false;
case 1:
return var != "";
case 2:
return var != null;
case 3:
return true; // ... Just saying it has a type array means it exists!
}
}