Skip to content

Glossary: PHP Basics

constructor

Also written: __construct

The method named `__construct` that runs when you create an object with `new`, so every object starts out complete.

Where the book teaches it

Related terms

constructor property promotionclassmethod