title: Is it possible to specify multiple return types on PHP 7?
body: <p>I have some methods that can return <strong>one of two return types</strong>. I'm using a framework utilizing MCV so refactoring these few functions in particular is not appealing.</p>
  
  <p>Is it possible to declare the return type returning one or the other and failing on anything else?</p>
  
  <pre><code>function test(): ?
  {
      if ($this-&gt;condition === false) {
          return FailObject;
      }
  
      return SucceedObject;
  }
  </code></pre>