$a=new test(); $a->fn(function(){print"ok";}); class test{ private $f=null; public function fn($func){ $this->f=$func; $this->f(); } } $this->f にコールバック関数を入れて $this->f()で実行させようと思ったのですが Fatal error: Call to undefined method test::f() in test.php on line 8 と出てしまいます。