0

Possible Duplicate:
when is eval evil in php?
When (if ever) is eval NOT evil?

Just as my question states, eval runs the contents as PHP Scripting directly.

in what cause would this be used; people refer to eval(); as an evil function to even consider using.

Why is it still in PHP when it is a very unusable/insecure function?

Community
  • 1
  • 1
user1968541
  • 333
  • 1
  • 3
  • 12
  • It isn't unusable, you just have to think long and hard before you use it. – Will C. Jan 14 '13 at 00:39
  • Also see: http://stackoverflow.com/questions/951373/when-is-eval-evil-in-php?rq=1 – halfer Jan 14 '13 at 00:41
  • @OliCharlesworth No, this question is asking/trying to spark up a debate on why eval is still in PHP, not asking for the usage of it – user1968541 Jan 14 '13 at 00:42
  • @user1968541: Stack Overflow is not the place for debates. Anyway, the fact that there are "non-evil" applications for `eval` is one reason it still exists. – Oliver Charlesworth Jan 14 '13 at 00:43
  • @OliCharlesworth Some questions which are "locked for historical reasons" have sparked up debates, so why is it illegal to attempt to spark a debate? – user1968541 Jan 14 '13 at 00:44
  • @user1968541: See the FAQ. – Oliver Charlesworth Jan 14 '13 at 00:45
  • It's still in PHP because not everyone's a noob. Some people can utilize it in an educated fashion; regardless of such memes. And btw, `eval` is the **one** feature that differentiates scripting from compiled languages. If you find it so abhorrent, you're probably using the wrong tool for the job. – mario Jan 14 '13 at 00:48

0 Answers0