Difficulty instantiating classes in psysh
<p>I am having difficulty getting psysh to instantiate classes.</p>

<p>I am trying to use PSR-4 namespaces, and have registered a psr-4 autoload in composer like this:</p>

<pre><code>"autoload": {
        "psr-4": {
            "System\\": "phpclasses/"
        }
    },
</code></pre>

<p>There is a class in <em>phpclasses\Test.php</em>, class name <code>Test</code> with a static method called <code>hello()</code>.</p>

<p>I open a command shell, start psysh, and psysh appears to be working normally.</p>

<p>If I try to run <code>Test::hello();</code> it will fail, unless I call it like this first: <code>echo  System\Test::hello();</code></p>

<p>This actually fails with the message: </p>

<blockquote>
  <p>PHP Fatal error:  Class 'System\Test' not found in eval()'d code on line 1</p>
</blockquote>

<p>but then I can successfully run: <code>echo Test::hello();</code></p>

<p><code>echo System\Test::hello();</code> will never work</p>

<p>I tried Use <code>System;</code> and use <code>System\Test;</code> has no beneficial effect.</p>

<p>Every class I use, I have to go through this routine, which is kind of a drag because some of the classes uses static methods, and each of those will only work if each class has gone through that fail first routine.</p>

<p>Basically the same technique must be used for static or non-static methods.</p>

<p>I am running psysh in a command shell in windows 10, xampp (php 5.6), composer (current) installed.</p>

<p>Any suggestions for what I am doing wrong or need to do differently?</p>