| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2001-02-26 13:32 UTC] pvzweden at caiw dot 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).
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 00:00:01 2025 UTC | 
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.