Alana Storm
Alana Storm

Reputation: 166106

PHP Internals: Where are Arrays Created

What code in the php-src repo handles a PHP programmer creating an array?

That is -- as a PHP programmer I might do something like this

$foo = array();
$foo = [];

Behind the scenes, I assume there's some bit of central PHP internals code that's alloc-ing out the zvalue_value and zval structs. Where is that code?

Bonus -- if this is a dumb question -- why is it a dumb question? (i.e. what mis-assumption about the PHP Internals handling of an array am I missing?)

Upvotes: 2

Views: 88

Answers (1)

Shahnawaz Kadari
Shahnawaz Kadari

Reputation: 1571

According to this

Zend/zend_hash.c
Zend/zend_hash.h

Have array international code.

Upvotes: 2

Related Questions