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.
PHP - PHP で子クラスのオブジェクトを作成する場合、Java のように親クラスのコンストラクターを呼び出してから、クラスのコンストラクターを呼び出しますか?
いいえ、子クラスで親コンストラクターを呼び出す必要があります。
public function __construct() { parent::__construct(); //...other code }