title: Multiple return types of in a method?
body: <p>I have a rule class that has a <code>check($input)</code> method which returns a boolean <code>true</code> if the input is valid or returns a string with the error message when invalid. And because in PHP you can't specify a return type when declaring functions (like in Java for example), you can return whatever.</p>
  
  <p>Is it a best practice to have a method or variable only return/contain one value type? E.g. <code>boolean</code>, <code>string</code>, or <code>integer</code>.</p>
  
  <p>Usually when I'm implementing an interface, only one return type is expected with each of the methods.</p>