in php programming where is the array data and the address being stored?

57 Views Asked by At

i am new to php . i want to know the place where the array data and the address of array are being stored ? are they storing in heap and stack , respectivelylike C# ?

I read many articles but I could not found the answer . I used bard to find the answer but I am not sure that is correct . his answer is both of array data and its address are stored in heap

1

There are 1 best solutions below

0
Pooria Pahlevani On

The actual values you store in an array are stored in blocks of memory. PHP optimizes this storage by PHP's Zend Engine, to efficiently hold various types of values (integers, strings, objects, etc.). and also uses a hash table (hash map) internally to manage the association types. but the detail of how the PHP Engine works with the values and addresses is related to its kernel, and not to the place they are stored.