Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
PHP
/
Object-oriented programming
What does constructor property promotion guarantee by itself?
from Object-oriented programming
PHP 8.3.33
beginner
1 min
What does constructor property promotion guarantee by itself?
It declares and assigns a property from a visibility-marked constructor parameter.
It validates every business rule attached to the property.
It makes the promoted property deeply immutable.
It calls the parent constructor automatically.
Check
Ask AI about this kata
Report an error
next kata
Why would Checkout accept a ShippingPolicy interface in its constructor?
Quiz
A new version is available
Reload