title: Use Namespaces in PHP 5.2 If Statement
body: <p>Is it possible to use some sort of check before adding namespaces to a script that might be run on a php 5.2 server?</p>
  
  <p>For example, if you want to use doctrine(which requires 5.3) on a 5.3 server, and fallback to PDO on a 5.2 server.</p>
  
  <p>Example:</p>
  
  <pre><code>if($pdo){
  
    //RETURN a pdo connection
  
  }
  else if($doctrine){
  
     //this will fail even if doctrine is false because namespaces are being used
     $classLoader = new Doctrine\Common\ClassLoader('Doctrine\Common');  
     $classLoader-&gt;register();
  
  }
  </code></pre>
  
  <p>This is just an example, I am sure I can get this to work without namespaces, but just wondering if there is anyway to use them within an IF statement.</p>