Skip to main content
InterviewHubPRO
Section Overview
Q32

Question 32 of 50

Part 3: Production Tuning, Asynchronous Workers & High Scale (25 - 35)

64%
PHP & Zend Engine (50 Qs)•Part 3: Production Tuning, Asynchronous Workers & High Scale (25 - 35)

What is Copy-On-Write (COW) in PHP memory management?

senior LevelAsync & Promises

In Simple Words: When an array is assigned to another variable ($b = $a), PHP does not allocate new memory. Both variables point to the same internal array struct. A duplicate copy is allocated only when one of the variables is modified.