private function boolToString($var)
    {
        $copy = is_array($var) ? $var : [$var];

        foreach ($copy as $key => $value) {
            if (is_bool($value)) {
                $copy[$key] = $value ? '1' : '0';
            }
        }

        return is_array($var) ? $copy : $copy[0];
    }
private function boolToString($var)
    {
        $copy = is_array($var) ? $var : [$var];

        foreach ($copy as $key => $value) {
            if (is_bool($value)) {
                $copy[$key] = $value ? '1' : '0';
            }
        }

        return is_array($var) ? $copy : $copy[0];
    }
private function boolToString ( $ var ) { $ copy = is_array ( $ var ) ? $ var : [ $ var ] ; foreach ( $ copy as $ key => $ value ) { if ( is_bool ( $ value ) ) { $ copy [ $ key ] = $ value ? '1' : '0' ; } } return is_array ( $ var ) ? $ copy : $ copy [ 0 ] ; }
Converts boolean values to "0" and "1"

@param mixed $var The variable

@return mixed
Converts boolean values to 0 and 1