|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52107 Eval does not recognize local scope variables
Submitted: 2010-06-17 08:26 UTC Modified: 2013-02-18 00:34 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: nick dot mitin at gmail dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.3.2 OS: Ubuntu 10.04 32bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nick dot mitin at gmail dot com
New email:
PHP Version: OS:


 [2010-06-17 08:26 UTC] nick dot mitin at gmail dot com
Sometimes under undetermined conditions eval() does not see the local scope function variables.

$returnTo = $_SERVER['REQUEST_URI'];
eval('$this->content = "' . $this->application->getTemplate('/admin/user/login/login') . '";');

Assuming that I have $returnTo variable inside a '/admin/user/login/login', I see the "Notice: undefined variable $returnTo", while evaling it.

But, If I create a dummy function moo() and eval somthing there the notice is gone.

See whole listing for details.

Test script:
Whole listing:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-15 15:51 UTC]
Please try using this snapshot:
For Windows:

 [2011-11-15 15:51 UTC]
-Status: Open +Status: Feedback
 [2013-02-18 00:34 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 30 05:01:31 2024 UTC