In general, the variables in memory are placed in two places, one is a heap, and the other is a stack. The stack contains both primitive values and variables of the underlying type.
The reference variables such as pointer variables are placed inside the heap. The computer automatically clears the variables inside the stack (because the stack is the memory space allocated by the computer to the process),
And the variables inside the heap are randomly placed, and the computer doesn't know how much memory to erase.
The PHP language will automatically find the memory inside the heap after a program has been executed, and clear the variables (it's cool).
But when you do the process management programming, you open a listening process, always running there, a customer creates a pointer, and then the customer goes, you close the session, but not
Clear this pointer, and PHP doesn't care about the pointer (unless you close the process). In this way, a lot of pointers will be generated, lots of heap variables will be generated, and then your memory will be full.
Then you'll be GG.
PHP Process Management Programming Basics (Memory management DIY)