Advanced
PHP
Q73 / 100
What is PHP's weak map (WeakMap in PHP 8)?
Correct! Well done.
Incorrect.
The correct answer is B) A map keyed by objects where entries are garbage collected when the key object has no other references
B
Correct Answer
A map keyed by objects where entries are garbage collected when the key object has no other references
Explanation
WeakMap allows attaching data to objects without preventing their garbage collection. Useful for caching per-object metadata without memory leaks.
Progress
73/100