可捕获的致命错误:第35行的C:\ wamp64 \ www \ web \ index.php中无法将类mysqli的对象转换为字符串

I'm been messing with problem from many hours please help me out with the following code :

function run_queryy($nam , $pass , $one){
    $connec = mysqli_connect('localhost','root','','user_data');
    $m_pass =password_hash("$pass",PASSWORD_DEFAULT);
    $m_one = password_hash("$one",PASSWORD_DEFAULT);
    $m_default = password_hash("default",PASSWORD_DEFAULT);
    $puer = "INSERT INTO user 
                    (`name`, `pass`, `one_word`, `line`, `profile`) 
            VALUES ('$nam','$m_pass','$m_one','online','$m_default')";
    $resul = mysqli_query($connec,$puer);
    if($resul === TRUE){
        echo "<script>alert('DONE'); </script>";
    }else{
        echo "<script>alert('NOT DONE'); </script>";   
    }
    echo "mysqli_error($connec)";
    mysqli_close("$connec");  //line 35
} 

It is not working out even the query is not Inserting data and outputs 'NOT DONE' Please suggest a solution of this problem.