php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #15101 eval() in other context
Submitted: 2002-01-18 09:45 UTC Modified: 2010-12-29 17:42 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: tom dot polak at post dot sk Assigned: jani (profile)
Status: Closed Package: *General Issues
PHP Version: 4.1.0 OS: Solaris
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tom dot polak at post dot sk
New email:
PHP Version: OS:

 

 [2002-01-18 09:45 UTC] tom dot polak at post dot sk
Hello,
my request is to improve function eval() to be possible evaluate given string in other than current context.
In SQLWindows, where I have programming before, I have this feature and was very useful.
It means, that on the some place in script we save "context" to be used for evaluate and receive some "resource variable" to identify it.
Lately, we can call eval() with this additional parameter to be able evaluate given string in previously saved context.
In SQLWindows I have used this to "bind" variables into dynamicaly generated SQL statements, because they were generated inside some functions library, where the current local variables are not in scope.
If it is not clear, I can give you more specification.

If you do not realize this feature, send me info, to be not waiting in my project on it.

Looking forward to your answer.

Best regards,
Tomas Polak
mailto:tom.polak@post.sk

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-18 21:58 UTC] codeslinger at compsalot dot com
this bug is really old, it can be closed now...  as FIXED.

php now has at least two ways that you can accomplish this.

1) in php 5.3+  you can create a name space and do the eval inside of it.

2) On windows you can use ActiveScript PHP and it will behave exactly as you described for the behavior of SQLWindows.

or you could just exec or even popen an instance of php...
 [2010-12-29 17:42 UTC] jani@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 09:01:30 2024 UTC