All Questions
Tagged with php-internals variables
3
questions
1
vote
0
answers
35
views
Are PHP zvals mutable?
I've been reading about memory management in PHP and learned that variables in PHP copy the reference to zvals as long as you don't do a write operation (copy on write paradigm).
https://www....
1
vote
1
answer
129
views
When does a 'symbol' / 'variable name' get created in PHP?
This is my setting:
display_startup_errors = on
display_errors = On
error_reporting = E_ALL | E_STRICT
//code1:
$a = "abcd";
xdebug_debug_zval('a');
The above line of code would create a zval ...
12
votes
1
answer
4k
views
How does PHP assign and free memory for variables?
I was wondering when does PHP free the memory which is used for a variables
for example
function foo(){
$foo = 'data';
return $foo; // <- is the memory space for `$foo` emptied at this point?...