First i need import a file from PHP_FUNCTION(), and passing to imported php file some variables from C function into userspace.
Example:
include_a_file.c
PHP_FUNCTION(include_a_php_file)
{
zval *var_to_userspace;
char *str;
str = "string send to userspace";
ZVAL_STRING(var_to_userspace, str, 0);
php_require_once("a_file.php"); // <-- how to?
}
a_file.php
<?php
print "<pre>";
vardump($var_to_userspace);
print "</pre>";
?>