I want to run something like this from php-src in the Clion debugger:

int main(){ size_t i; Bucket p; zval val; HashTable ht; zend_hash_init(&ht, 8, NULL, NULL, 1); for (i=0; i < ht.nTableSize; i++) { p = ht.arData[i]; val = p.val; } printf ("sizeof HT_DATA_SIZE: %d\n", HT_DATA_SIZE((&ht)->nTableSize)); printf ("sizeof HT_MIN_MASK: %d\n", HT_MIN_MASK); printf ("sizeof HT_HASH_SIZE: %d\n", HT_HASH_SIZE((&ht)->nTableMask) ); printf ("sizeof HT_SIZE: %d\n", HT_SIZE(&ht)); } 
  • one
    And what's the problem? - cpp questions
  • I do not know how to make such code work. It turns out to use data structures from PHP only inside PHP itself, for example, in the form of a ready-made extension. And for debugging I need just such a code, as I wrote to start. How to do it? - legale

0