UTILITY

to_bool()

Convert common human-readable boolean values.

Signature

bool to_bool(mixed $value, bool $default = false)

Example

to_bool('yes'); // true

Available from: 1.5.0

Reference navigation

Previous: timer_start()

Next: token()

Back to utilities