Hey Everyone,
I'm wanting to create a fuction that has 2 or more possible return types if thats possible. I.E
Thanks for any help you can givePHP Code:
public String, Boolean testfunction(string input, string returntype="boolean"){
if(input == "String" && returntype=="boolean")
return true;
else
return false;
if(input == "String" && returntype=="string")
return "string is equal to string";
else
return "string is not equal to string";
}


Reply With Quote

Bookmarks