PHP 7 and strict "resource" types
<p>Does PHP 7 support strict typing for resources? If so, how?</p>

<p>For example:</p>

<pre><code>    declare (strict_types=1);

    $ch = curl_init ();
    test ($ch);

    function test (resource $ch)
    {

    }
</code></pre>

<p>The above will give the error: </p>

<blockquote>
  <p>Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of resource, resource given</p>
</blockquote>

<p>A var_dump on <code>$ch</code> reveals it to be <strong>resource(4, curl)</strong>, and the manual says <code>curl_init ()</code> returns a resource.</p>

<p>Is it at all possible to strictly type the <code>test()</code> function to support the <code>$ch variable</code>?</p>