I am new to PHP and has started with Moodle. In Moodle I found that there is a global object $DB, instance of moodle_database class. I found that moodle_database is an abstract class. And various functions of moodle_database are abstract as well.
global $DB;
$DB = new moodle_database();
And moodle_database:
abstract class moodle_database
How is it possible to create an instance of abstract class? Even if moodle_database was extended by some other class and $DB was an object of that class, things can be assumed to be simple.