Link to home
Start Free TrialLog in
Avatar of karp13
karp13

asked on

Check to see if a function finishes

I am not sure how to word this, so please be patient.  I am probably thinking about this wrong.  How do I make sure that a function that I wrote finishes with no errors before moving on?  I am really looking to know if when I call a function and then have some processing to do after that function that it finished without problems.  Like I said I probably know how to do this, but I just cannot put my finger on it right now.



ASKER CERTIFIED SOLUTION
Avatar of philetaylor
philetaylor

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tech_cyclops
tech_cyclops

Hi, i agree with philetaylor, but if your function returns something other than '0' or '1' you could try something like this:

function test(){
     //Does something
     //Returns something
}

$testVar = test();
if(isSet($testVar))
{
      //it worked
}
else
{
      //it didn't work
}

hope it helps :)