+ zval zclient, args[2];
+ php_http_client_object_t *client_obj = arg;
+ zend_error_handling zeh;
+
+ ZVAL_OBJECT(&zclient, &client_obj->zo, 1);
+ ZVAL_OBJECT(&args[0], &((php_http_message_object_t *) e->opaque)->zo, 1);
+ object_init(&args[1]);
+ add_property_bool(&args[1], "started", progress->started);
+ add_property_bool(&args[1], "finished", progress->finished);
+ add_property_string(&args[1], "info", STR_PTR(progress->info));
+ add_property_double(&args[1], "dltotal", progress->dl.total);
+ add_property_double(&args[1], "dlnow", progress->dl.now);
+ add_property_double(&args[1], "ultotal", progress->ul.total);
+ add_property_double(&args[1], "ulnow", progress->ul.now);
+
+ zend_replace_error_handling(EH_NORMAL, NULL, &zeh);
+ ++client->callback.depth;
+ php_http_object_method_call(&client_obj->notify, &zclient, NULL, 2, args);
+ --client->callback.depth;
+ zend_restore_error_handling(&zeh);
+
+ zval_ptr_dtor(&zclient);
+ zval_ptr_dtor(&args[0]);
+ zval_ptr_dtor(&args[1]);
+}
+
+static void handle_debug(void *arg, php_http_client_t *client, php_http_client_enqueue_t *e, unsigned type, const char *data, size_t size)
+{
+ zval ztype, zdata, zreq, zclient;