(PECL getdns >= 0.10.0)
php_getdns_context_get_update_callback — Get the name of the function that will be called when a context value changes.
This function gets the name of a callback function in PHP user space and associated user arguments that will be called when a context value changes. The callback function will be written to accept two parameters. The first is an integer value that identifies the context element that has been changed. The second is an array that represents the user arguments passed to the php_getdns_context_set_update_callback() function.
The previously created DNS context that is to be used with this request.
Either NULL if no context update callback has been set or an indexed array that contains information used to control callback processing. The first element of the array will contain a character string representing the name of the PHP client function that will be called when a context value changes. Additional array elements are optional and may be present if user arguments were passed to the php_getdns_context_set_update_callback() function. The callback function will receive the complete array for local processing with all elements included as specified. Note that this argument is passed by reference and any existing value will be overwritten.
It's important to understand that the getdns library copies the address of the userArg data structure that was passed to the php_getdns_context_set_update_callback() function. Any changes to this value that are made after calling php_getdns_context_set_update_callback() may have unintended consequences. Callers should use a new PHP variable to receive the userArg array from this function to avoid overwriting any existing values that were previously set.
This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.