When returning values in php, is it considered good or bad practice to return mixed data types. I\'m working on a project where I am constantly faced with methods that return a
Null is a fairly common return value to indicate that there is no return value. You should return null (not "failed", or -1) if the function wants to return no ID at all.
If it is exceptional that an ID was not found, you should throw an exception.