PHP 4.0 Bug #9466 Updated: Eval With return doesn't work
| From: | cnewbill@php.net | Date: | Mon, 26 Feb 2001 19:05:30 +0000 |
| Subject: | PHP 4.0 Bug #9466 Updated: Eval With return doesn't work | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-47574@lists.php.net to get a copy of this message | ||
ID: 9466
Updated by: cnewbill
Reported By: pvzweden@caiw.nl
Old-Status: Open
Status: Closed
Bug Type: Unknown/Other Function
Assigned To:
Comments:
It does work with a CVS snapshot.
<?php
$eval = "return 123;";
$e = eval("$eval");
var_dump($e);
?>
OUTPUT
int(123)
You also did not have a ";" terminating your return 0 line. Fix your code and try again.
If the problem persists try a CVS snapshot from http://snaps.php.net and reopen this report.
Previous Comments:
---------------------------------------------------------------------------
[2001-02-26 13:32:53] pvzweden@caiw.nl
When i create a piece of code with eval like :
eval = "if (!isset($$value)) {";
eval .= " return 0; "
eval .= "}";
eval("$eval");
The return statement doesn't work.
It works with earlier versions of php. (php3).
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9466&edit=2