eval in php-module
| From: | Matthias Winkelmann | Date: | Sat, 07 Oct 2000 15:10:18 +0000 |
| Subject: | eval in php-module | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-34440@lists.php.net to get a copy of this message | ||
Hi!
For a current project I am working on a custom module for php4.
Unfortunately, I am having a problem trying to evalute php code in this
module. I need a function that basically replicates the eval() statement
from php with some minor changes.
I tried 'zend_eval_string("$test = 123;", &retval ELS_DC);', wich workds,
but only for simple statements. Others, such as "$test = 123; $test2= 345;"
do not work, nor does the echo construct.
Is zend_eval_string the right function for this purpose and what is the
exact syntax? Where can I find the implementation of eval() in the php
source? What would be the best way to implement such a function?
Please cc: to kr@someon.com since I am currently not subscribed to the list.
Regards,
--kr