我想从类中调用一个带有变量名称的静态函数。 期望的结果: class Controller extends Controller {
public $model = 'ModelName';
public function index() {
$woot = $this->model::find('');
var_dump($woot);
}
class test {
public:
static int n;
test() { n++; };
~test() { n--; };
};
int test::n=0; //<----what is this step called? how can a class be declared as an integer?
int main() {