Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$var = 'Foo'; $object = new {$var . 'Controller'}(); // new FooController()
これを可能にする構文はありますか? もちろん、上記の例は機能しません。
はい、完全なクラス名を変数に格納するだけです。
$class = $var . 'Controller'; $instance = new $class();
I have inherited a large codebase, mostly in C++; this C++ is creating an HTML page that is being displayed in an Internet Explorer web browser.
The HTML does not in