This boolean filter is honestly really big and I'm wondering if we need so much lines of code for such a simple thing. I'd be in favour of replacing it by the built-in PHP boolean filter:

filter_var($value, FILTER_VALIDATE_BOOLEAN)

We loose some features (like localization), but for most cases, it works the same ("true" is evaluated to true, "false" to false, 0 to false, 1 to true...).

What do you think?