Re: eval()
| From: | Kunal Jhunjhunwala | Date: | Sun, 20 Jan 2002 12:23:21 +0000 |
| Subject: | Re: eval() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-81264@lists.php.net to get a copy of this message | ||
Hey,
I tend to agree with you. But what is the most effiecent way of using php
code in template files then? I am not going to move my templates to a
dbase.. thats for sure.
Regards,
Kunal Jhunjhunwala
----- Original Message -----
From: "Michael Waples" <mwaples@waples.net>
To: "Kunal Jhunjhunwala" <kunal@getmonked.net>
Cc: "php-list" <php-general@lists.php.net>
Sent: Sunday, January 20, 2002 5:51 PM
Subject: Re: eval()
> Kunal Jhunjhunwala wrote:
> >
> > Hey
> > Does anybody know if its wise to use eval() ? I know Vbulletin uses it..
but
> > there is something about it I just cant digest.. it seems to be a very
> > powerfull function which can be very easily exploited... anyone else
have
> > any thoughts?
> > Regards,
> > Kunal
>
> Loading your templates into a database, pulling them out on every page
> load and running eval() to run the code isn't the most efficient way to
> do it.
> Then running eval() inside a loop on that code isn't efficient either.
>
> I think eval() is used this way by some people because they don't know
> how to write files using php propely. So instead they just put it in a
> database. You also completely miss out on getting the benefits of one of
> the different php caching products.
> For me a database is for storing data - not php code.
> Vbulletin as an example of complete overuse of eval().
>
>