PHP 4.0 Bug #9417 Updated: zend_eval_string() doesn't work like eval() :(

From: Date: Fri, 23 Feb 2001 23:13:58 +0000
Subject: PHP 4.0 Bug #9417 Updated: zend_eval_string() doesn't work like eval() :(
Groups: php.dev 
Request: Send a blank email to php-dev+get-47367@lists.php.net to get a copy of this message
ID: 9417 User Update by: david@guerizec.net Status: Open Bug Type: Feature/Change Request Description: zend_eval_string() doesn't work like eval() :( I've found a workaround, it's to replicate the function zend_eval_string() in my own module, less the few lines that pose problem. I consider this as a workaround only, since I'm not sure if the code used in that function follows the exact Zend API, so I will let this feature request open. Previous Comments: --------------------------------------------------------------------------- [2001-02-23 15:29:54] david@guerizec.net Hi, I commented out a few lines from zend_eval_string() and now it behaves the right way. Here are the line numbers I removed (corresponding to the function zend_eval_string): zend_execute_API.c: 492 to 498, 501. Note that I'm not especially asking to modify this function, but to add a new function that would behave like the real eval() statement. And it would be good if I this new function is available before 4.0.5 is out, cause the midgard module relies on it. Thanks --------------------------------------------------------------------------- [2001-02-22 21:13:41] david@guerizec.net I need to simulate a call to eval() and the only function that seems to be able to do it is zend_eval_string(). Although it evaluates the string when I put NULL as second parameter (retval_ptr), it doesn't work (parse error) when I want to simulate the new behavior of PHP4 eval() (ie. with a return value) Is it possible to change the existing zend_eval_string (I think not cause pcre and assert use it this way already) ? If not, is it possible to have a new function that would behave like eval(), with the same parameters as zend_eval_string (I want to be able to specify a name on the string) ? Thanx --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=9417

« previous php.dev (#47367) next »