1<?php
2class Loader {
3    static private $loader;
4
5    static function getLoader() {
6        if (null !== self::$loader) {
7            return self::$loader;
8        }
9        return self::$loader = new Loader();
10    }
11
12    static function getCounter() {
13        static $counter = 0;
14        return $counter++;
15    }
16}
17
18class ExtLoader extends Loader {
19}
20
21Loader::getLoader();
22Loader::getCounter();
23Loader::getCounter();
24