phpでサブクラス自身を表す際にnew self()の使い方

サンプルコード
class startnews24self{
public function __construct(){
echo 'welcome to startnews.com and study it!’;
}
public static function getInstance(){
new self();
}
}

startnews24self::getInstance();

PHP

Posted by arkgame