#include "php_cxx.h" char ** php::call_c_string_arr(size_t *size, char *fn, char *argspec = "", ...);
Description: Call the PHP function fn with the arguments described by argspec and included as subsequent arguments. If argspec is not specified the function will be called without any arguments. The type of the value returned from PHP must be an array and the values of that array will be put into a C array of type char * large enough to hold them. The size of that array will be returned to the client via the size argument and it is the responsibility of the client to free the array returned when they are done. Each time PHP type conversion is necessary to convert any element of the returned array to a string it may generate a type mismatch warning if those warnings are enabled. The memory for each individual string in the array is maintained by the php object so if that object is destroyed the pointers in the array are no longer valid; if the string values need to persist beyond the life of the php object then they must be copied.
Errors: It is an error for the number of arguments described in argspec to differ from the number of arguments provided thereafter. It is an error for the types of additional arguments to differ from their description in argspec(see Table 1 on page
for details). It is an error for the size argument to be passed in as NULL. If the value returned by PHP is not an array call_double_arr will output a type mismatch error (regardless of whether type warnings are on or not) and return NULL. Any internal errors during execution will result in the status flag (see php::status) being set to a nonzero value.