3

I'm trying to write an extension for PHP and i need to execute some PHP code.

After searching i figured out that i could use "zend_eval_string" in my c extension. my problem is that i need the return value from the code that executed by this function.

for example the code is : "return array(...);" I need to execute the code and get the returned array.

I already tried this but it wont help

zval retval;
zend_eval_string(code, &retval, "" TSRMLS_CC);
Ali choobdar
  • 121
  • 6
  • 1
    http://stackoverflow.com/questions/17383672/calling-extension-function-in-zend-eval-string – ɹɐqʞɐ zoɹǝɟ Apr 13 '14 at 10:05
  • 2
    i saw this before but the return value in this example is int and specify that the code execution was successful or not. i need the return value of evaluated script. – Ali choobdar Apr 13 '14 at 10:08

0 Answers0