PHP namespace PDO not found

You should be using correct namespaces for the objects in your methods, either “use” them or prefix them with the root namespace;

<?php
//... namespace etc...

use \PDO;

self::$connection = new PDO("mysql:host=$host;dbname=$base", $user, $pass);
    

or simply;

self::$connection = new \PDO("mysql:host=$host;dbname=$base", $user, $pass);

Leave a Comment