note 120154 added to function.eval

From: Date: Sun, 13 Nov 2016 03:54:52 +0000
Subject: note 120154 added to function.eval
Groups: php.notes 
Request: Send a blank email to php-notes+get-207085@lists.php.net to get a copy of this message
eval() should be used for debugging. I really don't understand why they are repeatedly expressing how "dangerous" it is, and basically tell us not to use it... It's all just a little bit too much. As coders, we should always try to use proper coding techniques and always protect our websites / applications from SQL injections and other forms of hacking. When creating the eval() function, the creators obviously had the compiler in mind. Why not add something to escape the delimiters within the eval()? Or why not allow the use of curly brackets like other functions? They could have just made it unusable / error out if there was a "dangerous" apostrophe in it. Lol I don't know. I just think this page makes it seem like we are all idiots incapable of using the eval() statement properly. But I think as programmers we will be alright. We wont throw an eval() directly into production just for laughs! We know to play around with it in development first :) ---- Server IP: 72.52.91.14 Probable Submitter: 45.29.91.147 ---- Manual Page -- http://php.net/manual/en/function.eval.php Edit -- https://master.php.net/note/edit/120154 Del: integrated -- https://master.php.net/note/delete/120154/integrated Del: useless -- https://master.php.net/note/delete/120154/useless Del: bad code -- https://master.php.net/note/delete/120154/bad+code Del: spam -- https://master.php.net/note/delete/120154/spam Del: non-english -- https://master.php.net/note/delete/120154/non-english Del: in docs -- https://master.php.net/note/delete/120154/in+docs Del: other reasons-- https://master.php.net/note/delete/120154 Reject -- https://master.php.net/note/reject/120154 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#207085) next »