MemoryReferences

Showing 1 result

Share

Introduction to Objects and References in PHP Memory

In this article, I will talk about how object and variable references are controlled in memory, since this is an issue that can generate discussion and differing opinions. One question to ponder is: “By default, are objects passed by reference or by copy in PHP?” I’m going to talk first about what references aren’t in PHP; second, I’ll discuss what they are, and finally, I will examine how the garbage collector works in PHP.

6 minute readContinue Reading
Agustin Villalba

Agustin Villalba

World-class articles, delivered weekly.

Subscription implies consent to our privacy policy

Join the Toptal® community.