Re: Rate my (really) simple template class
| From: | Brian Waters | Date: | Tue, 15 Feb 2011 22:02:51 +0000 |
| Subject: | Re: Rate my (really) simple template class | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311333@lists.php.net to get a copy of this message | ||
On Mon, Feb 14, 2011 at 11:49 PM, Paul M Foster <paulf@quillandmouse.com> wrote:
> Advice: don't use eval() this way. It's slow and dangerous.
Could you elaborate, or provide a link?
> ...read in the file and pass it to you on the stack, which is
> really an abuse of the stack if you can avoid it.
Interesting. I'm used to statically-typed languages. Normally I never
would have passed a large structure like that on the stack. But then
again, in those languages, large structures are usually passed by
reference, by default. In C, the only way to pass a string or array by
value is to wrap it in a struct, and in Java, objects are passed by
reference (if I recall correctly).
Guess that's something to get used to.
- BW