Call an object like it's a function?

前端 未结 2 483
小蘑菇
小蘑菇 2021-01-21 11:23

Is there any way in PHP to call an object like it\'s a function?

class Funct {
  public function __callSelf() {
    echo \'Called!\';
  }
}

$myFunc = new Funct(         


        
2条回答
提交回复
热议问题