Converts a value to a boolean. A missing value or any value whose boolean coercion is false (false, 0, empty string, null) becomes false; everything else becomes true.
toBoolean(value)
→ returns boolean
Various values coerced to booleans.
writeDump(toBoolean(1));
writeDump(toBoolean(""));
writeDump(toBoolean("off"));
Expected Result: true false true
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.