Problems with PHP namespaces and built-in classes, how to fix?

Viewed 9587

I'm writing a small library in PHP and i'm having some problems with built-in classes not being read. For example:

namespace Woody;

class Test {
  public function __construct() {
    $db = new PDO(params);
  }
}

This gives me:

PHP Fatal error: Class 'Woody\PDO' not found in /var/www/test.php

3 Answers
Related