mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
24 lines
419 B
PHP
24 lines
419 B
PHP
<?php
|
|
class Loader {
|
|
static private $loader;
|
|
|
|
static function getLoader() {
|
|
if (null !== self::$loader) {
|
|
return self::$loader;
|
|
}
|
|
return self::$loader = new Loader();
|
|
}
|
|
|
|
static function getCounter() {
|
|
static $counter = 0;
|
|
return $counter++;
|
|
}
|
|
}
|
|
|
|
class ExtLoader extends Loader {
|
|
}
|
|
|
|
Loader::getLoader();
|
|
Loader::getCounter();
|
|
Loader::getCounter();
|