protected function isSoftBool($string)
    {
        if (!is_scalar($string) || $string === null) {
            return false;
        }
        
        $string = (string) $string;
        
        return $string == '0' || $string == '1';
    }
protected function isSoftBool($string)
    {
        if (!is_scalar($string) || $string === null) {
            return false;
        }
        
        $string = (string) $string;
        
        return $string == '0' || $string == '1';
    }
protected function isSoftBool ( $ string ) { if ( ! is_scalar ( $ string ) || $ string === null ) { return false ; } $ string = ( string ) $ string ; return $ string == '0' || $ string == '1' ; }
Test if 0 or 1 or string 1 oe 0

@param *scalar $string Value to test

@return bool
Test if 0 or 1 or string 1 oe 0