Does PHP ever stack allocate?
| From: | Olle Härstedt | Date: | Fri, 01 Jan 2021 21:18:10 +0000 |
| Subject: | Does PHP ever stack allocate? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-112707@lists.php.net to get a copy of this message | ||
Or is everything reference counted with heap allocation? Since PHP has
escape analysis, this could be used to use the stack instead, and kill the
memory when the scope ends. If PHP uses the stack, can this be seen in the
opcode?
This stackoverflow thread does not really answer my question.
https://stackoverflow.com/questions/24223249/stack-and-heap-in-php#:~:text=In%20static%20typed%20languages%20all,known%20until%20the%20run%20time
.
Olle