2

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?)

Alana Storm
  • 164,128
  • 91
  • 395
  • 599

1 Answers1

2

According to this

Zend/zend_hash.c
Zend/zend_hash.h

Have array international code.

Shahnawaz Kadari
  • 1,423
  • 1
  • 12
  • 20