Ive looked and tried but I can\'t find an answer.
In PHP, is it possible to call a class\' member function (when that class requires a constructor to receive parame
Unfortunately PHP doesn't have support to do this, but you are a creative and look guy :D
You can use an "factory", sample:
__aaa = $aaa; } public static function factory($aaa) { return new Foo($aaa); } public function doX() { return $this->__aaa * 2; } } Foo::factory(10)->doX(); // outputs 20