#include "php_cxx.h" void php::eval_string(const char *fmt, ...);
Description: Use the PHP interpreter to evaluate string fmt with any printf style format arguments substituted for the value in the additional arguments. NOTE: This function is made available for more advanced clients but its use is generally discouraged.
Example: The php::load function is actually implemented very simply as:
php_ret php::load(const char *filename)
{
return eval_string("include_once('%s');", filename);
}
Note the inclusion of the semicolon as the interpreter will treat the string being evaluated as a line of PHP code.
Errors: It is an error for the types or count of format specifiers in fmt to differ from the additional arguments passed. Any internal errors during execution will result in the status flag (see php::status) being set to a nonzero value.