Does PHP wait? (no replies)

Hi!

I have a php class that validates user submited content. It goes something like this:

$var = $validate->fct($_POST['something']);


... and in my class:

function fct($var){
   //validates data
   if($noproblem){
      return $var;
   }else{
      //logout the user and exit();
   }
}


I need to be sure that the script exits when !$noproblem. I really don't know if the php waits for the function to end or if it goes on. Any help?