title: How does the keyword "use" work in PHP and can I import classes with it?
body: <p>I have a file with a class <code>Resp</code>. The path is:</p>
  
  <pre><code>C:\xampp\htdocs\One\Classes\Resp.php
  </code></pre>
  
  <p>And I have an <code>index.php</code> file in this directory:</p>
  
  <pre><code>C:\xampp\htdocs\Two\Http\index.php
  </code></pre>
  
  <p>In this <code>index.php</code> file I want to instantiate a class <code>Resp</code>.</p>
  
  <pre><code>$a = new Resp();
  </code></pre>
  
  <p>I know I can use <code>require</code> or <code>include</code> keywords to include the file with a class:</p>
  
  <pre><code>require("One\Classes\Resp.php");       // I've set the include_path correctly already ";C:\xampp\htdocs". It works.
  $a = new Resp();
  </code></pre>
  
  <p>But I want to import classes without using <code>require</code> or <code>include</code>. I'm trying to understand how <code>use</code> keyword works. I tried theses steps but nothing works:</p>
  
  <pre><code>use One\Classes\Resp;
  use xampp\htdocs\One\Classes\Resp;
  use htdocs\One\Classes\Resp;
  use One\Classes;
  use htdocs\One\Classes;    /* nothing works */
  
  $a = new Resp();
  </code></pre>
  
  <p>It says:</p>
  
  <pre><code>Fatal error: Class 'One\Classes\Resp' not found in C:\xampp\htdocs\Two\Http\index.php
  </code></pre>
  
  <p>How does the keyword <code>use</code> work? Can I use it to import classes?</p>