Hi All,

A correction to my earlier email.

On Tue, Apr 15, 2008 at 11:37 AM, Marshall Greenblatt <
[EMAIL PROTECTED]> wrote:

>
> Approach B:
>
> Execute a PHP script and retrieve the return value without calling a
> particular PHP function.
>
> On the PHP side:
>
> return strtoupper( $GLOBAL_VARIABLE );
>
> On the application side:
>
> php_register_variable("GLOBAL_VARIABLE", "the string to make uppercase",
> NULL TSRMLS_CC);
>
> zval *retval;
> php_execute_simple_script(&file_handle, &retval TSRMLS_CC);
>
> My problem with Approach B is that the return zval from the
> php_execute_simple_script() function always contains a true/false value
> instead of whatever was returned using the 'return' construct from the code.
>
>
This approach does actually work as advertised.  I had a bug in my test code
:-).

However, that still leaves the original question -- how to call a function
defined in a PHP script using call_user_function() or similar?

Thanks,
Marshall

Reply via email to