メソッドチェーン2

<?php

$abc = '変数abc';
echo $abc, PHP_EOL;
echo ${'abc'}, PHP_EOL;
$name = 'abc';
echo ${$name}, PHP_EOL;
echo $$name, PHP_EOL;

function abc(){
	echo '関数abcが実行されました', PHP_EOL;
}
abc();
$name = 'abc';
$name();
?>
<?php

class Chain {
	public static function _(){
		return new self;
	}

	public function p($name){
		echo $name;
		return $this;
	}
}

Chain::_()->p('hoge')->p('fuga');