<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1032318" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1032318</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Is whether it should use, but</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1271944</link>
    <description> &lt;p&gt;Is whether it should use, but most programmers agree that, unless you are drawing data from a database or a trusted source, then you should not use it for debate.&lt;/p&gt;
 </description>
     <pubDate>Tue, 10 Jan 2012 05:46:54 +0000</pubDate>
 <dc:creator>yingxuy</dc:creator>
 <guid isPermaLink="false">comment 1271944 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>BTW the additional is faster</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1266913</link>
    <description> &lt;p&gt;BTW the additional is faster because it avoids application eval. Eval is awfully bad for your code&#039;s speed. Especially if you intend on accomplishing it abounding times. Instead use the constant() method.&lt;/p&gt;
 </description>
     <pubDate>Wed, 13 Jul 2011 21:28:00 +0000</pubDate>
 <dc:creator>avinmichal</dc:creator>
 <guid isPermaLink="false">comment 1266913 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189350</link>
    <description> &lt;p&gt;Ah, thanks for that dk01! &lt;/p&gt;
&lt;p&gt;Luckily most of the eval stuff in vB is pulled from a database, but in that exploit it seems that a get variable is being eval&#039;d ... Very dangerous, they&#039;re a bit silly to allow that to happen!&lt;/p&gt;
&lt;p&gt;Haven&#039;t had to use eval in JavaScript yet, will make a note to avoid it like the plague. &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 04 Jan 2006 21:53:34 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1189350 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189282</link>
    <description> &lt;p&gt;I stand corrected. eval() in php is not inefficient but it is a security risk.  There is debate over whether it should be used at all but most programmers agree that unless you are drawing the data from a database or trusted source then you should not use it.  The reason is that it can execute arbitrary code.  So for example if you have register globals on then this could be dangerous. So.. for some references.  You mentioned vBulletin? Here is an exploit for that project caused by the fact that it uses eval:&lt;br /&gt;
&lt;a href=&quot;http://www.osvdb.org/14047&quot; class=&quot;bb-url&quot;&gt;http://www.osvdb.org/14047&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Another few articles on the subject: &lt;a href=&quot;http://www.sitepoint.com/blogs/2005/02/27/eval-is-dead-long-live-eval/&quot; class=&quot;bb-url&quot;&gt;http://www.sitepoint.com/blogs/2005/02/27/eval-is-dead-long-live-eval/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.phpwact.org/security/functions/eval_functions?DokuWiki=064b51a8941c7b29c4e07fd16ce1&quot; class=&quot;bb-url&quot;&gt;http://www.phpwact.org/security/functions/eval_functions?DokuWiki=064b51a8941c7b29c4e07fd16ce1&lt;/a&gt;...&lt;/p&gt;
&lt;p&gt;I found this interesting because I know in javascript eval will actually make your code slower. (Try having several large eval&#039;s running in js, its notably slower)&lt;/p&gt;
 </description>
     <pubDate>Tue, 03 Jan 2006 23:08:49 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1189282 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189259</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;dk01 wrote:&lt;/strong&gt; Eval is notoriously bad for your code&#039;s speed. Especially if you intend on doing it many times. Instead use the constant() method.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I know this is off-topic, but vBulletin (the forum software we use) uses eval all the time, does constant() perform the same functionality (parse code in a variable)?&lt;/p&gt;
&lt;p&gt;Could you substantiate that dk01? Do you know of someone who&#039;s tested the function, maybe you could provide links? Thanks.&lt;/p&gt;
 </description>
     <pubDate>Tue, 03 Jan 2006 20:27:55 +0000</pubDate>
 <dc:creator>JeevesBond</dc:creator>
 <guid isPermaLink="false">comment 1189259 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189205</link>
    <description> &lt;p&gt;*happy new years to you too!*&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Jan 2006 17:32:23 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1189205 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>thanks</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189204</link>
    <description> &lt;p&gt;Thanks all...very helpful.  I have actually completed the code today...thanks to you. HAPPY NEW YEAR !! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/beer.png&quot; title=&quot;Cheers!&quot; alt=&quot;Cheers!&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Jan 2006 16:24:46 +0000</pubDate>
 <dc:creator>mizzy</dc:creator>
 <guid isPermaLink="false">comment 1189204 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189197</link>
    <description> &lt;p&gt;BTW the second is faster because it avoids using eval. Eval is notoriously bad for your code&#039;s speed. Especially if you intend on doing it many times.  Instead use the constant() method.&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Jan 2006 09:09:16 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1189197 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189196</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;&lt;strong&gt;Greg K wrote:&lt;/strong&gt; &lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; define&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;ECOSETUP\&quot;,10);&lt;br /&gt; define(\&quot;TMPSETUP\&quot;,20);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name1&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;ECO\&quot;;&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;TMP\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; eval(\&quot;\$val1 = \&quot; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name1&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . \&quot;SETUP;\&quot;);&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = constant(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . \&quot;SETUP\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; echo \&quot;val1 = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val1&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; \n\&quot;;&lt;br /&gt; echo \&quot;val2 = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; \n\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt; Either one of those seems to work, the second method seems to use a function designed for this. I found the second method in the link that dk01 provided.&lt;/p&gt;
&lt;p&gt;  -Greg&lt;/p&gt;
&lt;p&gt; PS. Don&#039;t forget to make sure you have checking in place to make sure it is only calling defined constants.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Nice find!&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Jan 2006 09:07:54 +0000</pubDate>
 <dc:creator>dk01</dc:creator>
 <guid isPermaLink="false">comment 1189196 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/little-php-help#comment-1189194</link>
    <description> &lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; define&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;ECOSETUP\&quot;,10);&lt;br /&gt; define(\&quot;TMPSETUP\&quot;,20);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name1&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;ECO\&quot;;&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = \&quot;TMP\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; eval(\&quot;\$val1 = \&quot; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name1&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . \&quot;SETUP;\&quot;);&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; = constant(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$name2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . \&quot;SETUP\&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt; echo \&quot;val1 = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val1&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; \n\&quot;;&lt;br /&gt; echo \&quot;val2 = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$val2&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; \n\&quot;;&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt; Either one of those seems to work, the second method seems to use a function designed for this. I found the second method in the link that dk01 provided.&lt;/p&gt;
&lt;p&gt;  -Greg&lt;/p&gt;
&lt;p&gt; PS. Don&#039;t forget to make sure you have checking in place to make sure it is only calling defined constants.&lt;/p&gt;
 </description>
     <pubDate>Mon, 02 Jan 2006 06:23:27 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1189194 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
