true or false are the correct case, but they are treated as case-insensitive, so True or False and TRUE or FALSE also work no issue in PHP

Convert true/false to 1/0

$MyTrueFalseVariable = $MyTrueFalseVariable ? 1 : 0;