You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a XSLT with PHP project which involves allowing the user the possibility to write their own extension function. The problem I am hitting is on the C++ side the function (i.e. userFunction) is always returning null. I am currently working from PPH-CPP-LEGACY. Any ideas what I am doing wrong.
In PHP:
// define a user space function function userFunction($param) { echo("userspace function called with no param\n"); return "user function - data"; }
I have similar problem with lambda functions. Using the example http://www.php-cpp.com/documentation/lambda-functions, lambda function is called, but in C++/PHP is returned NULL value (even If i simple give "return 1;" statement at the beginning of the lambda function).
Tested with PHP 7.0 and PHP 7.1.
Update: Tested latest version with PHP 7.2 and it works!
Hi,
I am working on a XSLT with PHP project which involves allowing the user the possibility to write their own extension function. The problem I am hitting is on the C++ side the function (i.e. userFunction) is always returning null. I am currently working from PPH-CPP-LEGACY. Any ideas what I am doing wrong.
In PHP:
// define a user space function function userFunction($param) { echo("userspace function called with no param\n"); return "user function - data"; }
In C++:
`jobject JNICALL PHP_SaxonProcessor::phpNativeCall
(JNIEnv *env, jstring funcName, jobjectArray arguments, jobjectArray arrayTypes){
SaxonProcessor::sxn_environ->env->ReleaseStringUTFChars(funcName, nativeString);
if(data == NULL) {
return NULL;
} else {
return SaxonProcessor::sxn_environ->env->NewStringUTF(dataChar);
}
}`
The text was updated successfully, but these errors were encountered: