title: PHP TypeError: Parameter must be an instance of lib\util\mixed, string given
body: <p>In my PHP file I have created a function with a parameter which can be of any type. Because of this, I declared this parameter as <code>mixed</code>. It seems the <code>mixed</code> type is linked to the folder location where the class is headed; <code>lib\util</code>. The error says  <code>instance of lib\util\mixed</code>.</p>
  
  <pre><code>protected function curlSetOpt(int $param1, mixed $param2): bool
  {
      return anotherFunction($this-&gt;variable, $param1, $param2);
  }
  </code></pre>
  
  <p>The moment I call this method using a string, a TypeError occurs. </p>
  
  <blockquote>
    <p>Argument 2 passed to lib\util\Class::function() must be an instance of lib\util\mixed, string given</p>
  </blockquote>
  
  <p>Renaming the type from <code>mixed</code> to <code>string</code> works, but also other types are welcome.</p>