$sanitizerbit()

Sanitize to a bit, returning only integer 0 or 1

This works the same as the bool sanitizer except that it returns 0 or 1 rather than false or true.

Available since version 3.0.125.

Usage

$int = $sanitizer->bit($value);

Arguments

NameType(s)Description
$valuestring int array

Return value

int

See Also


$sanitizer methods and properties

API reference based on ProcessWire core version 3.0.251