Solution:
In PHP, objects are allocated automatically, when needed, and garbage collected when they are no longer useable, and it all happens without the intervention of the PHP programmer.
It’s perhaps of some interest to observe that PHP is itself written in C! the nitty gritty of memory management is written in C, which provides the tools needed to do that kind of thing, so that the language created, doesn’t require the programmer to do much themselves.
Although PHP can be sophisticated in implementation, it was not designed for robust computing.