php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40722 future request:add "safe eval" function
Submitted: 2007-03-05 05:56 UTC Modified: 2007-03-05 10:13 UTC
From: shimon at schoolportal dot co dot il Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 4.4.5 OS: na
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: shimon at schoolportal dot co dot il
New email:
PHP Version: OS:

 

 [2007-03-05 05:56 UTC] shimon at schoolportal dot co dot il
Description:
------------
i would be cool to have a "safe eval" function
for example:
eval($code, $safe=true,$safe_alow,$safe_disalow ,or  $safe_ini_settings);

i do want users to insert some code to use database and simple php
in their free web site to create info boxes and small website components  or php in their site templates. but i want to stay safe.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-05 10:13 UTC] tony2001@php.net
I'm afraid we'll never go this route again.
You have to manage privileges using your OS utilities, not PHP.
Also, the meaining of "safety" is quite dim in this particular case, so I can't just imagine a function that would be safe _for everyone_ and useable _for everyone_ without having a bunch of arguments or INI options.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Apr 24 09:01:27 2025 UTC