Q1: "how to modify this line to reproduce the behavior of PHP"
A1:
/* {{{ vendor_my_get_debug_info */
static HashTable*
vendor_my_get_debug_info(zend_object *object, int *is_temp)
{
vendor_my *intern = ZOBJ_TO_VENDOR_MY(object);
HashTable *debug_info=NULL, *std_props=NULL;
*i
Out of politeness I answer myself,
PHP_FUNCTION(var_dump)
-> php_var_dump()
-> zend_std_get_properties_for() // Zend
object handler get_properties_for
-> obj->handlers->get_debug_info(obj, &is_temp); // Zend
object handler get_debug_info
-> zend_std