next up previous contents
Next: php::call_c_string_arr Up: Function Reference Previous: php::call_bool_arr   Contents

php::call_c_string

#include "php_cxx.h"

char *
php::call_c_string(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 value returned by PHP will be interpreted as a C style string. If PHP type conversion is necessary it may generate a type mismatch warning if those warnings are enabled. The memory for this string is maintained by the php object so if that object is destroyed the string is no longer valid; if the string value needs to persist beyond the life of the php object then it 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). Any internal errors during execution will result in the status flag (see php::status) being set to a nonzero value.



Andrew Bosworth 2008-03-24