title: Can PHP's interactive mode run code in a namespace?
body: <p>While in PHP's interactive mode, I tried the following:</p>
  
  <pre><code>php &gt; namespace MyNamespace;
  php &gt; class Throwable {}
  </code></pre>
  
  <p>This results in a fatal error:</p>
  
  <pre><code>PHP Fatal error:  Cannot declare class Throwable, because the name is already in use in php shell code on line 1
  </code></pre>
  
  <p>However, the following code, when in a PHP file, executes without errors:</p>
  
  <pre><code>&lt;?php
  namespace MyNamespace;
  class Throwable {}
  </code></pre>
  
  <p>Therefore, is it possible to somehow set a namespace while in interactive mode? Or, is all code in interactive mode run in the global space regardless of a previous namespace definition?</p>