Cast boolean to int PHP

> Convert boolean to int
> Cast bool to integer

Description
Cast bool to int


$val = (int)true;  // 1
$val = (int)false; // 0

$var = intval(true);  // 1
$var = intval(false); // 0

SEE ALSO