Skip to main content
InterviewHubPRO
Section Overview
Q22

Question 22 of 50

Part 2: Zend Engine Internals, OPcache & Memory Architecture (11 - 24)

44%
PHP & Zend Engine (50 Qs)•Part 2: Zend Engine Internals, OPcache & Memory Architecture (11 - 24)

What are Readonly Classes and Properties and what guarantees do they provide?

senior LevelMost AskedSystem Design

In Simple Words: A readonly property can only be initialized once within its declared scope and can never be mutated afterward. Declaring readonly class enforces immutability across all instance properties.