php3-list | 2000051
Date: 05/15/00
- Next message: Richard Kurth: "[PHP3] Making my WebPages search engine friendly"
- Previous message: Richard Lynch: "Re: [PHP3] copying triangles in PHP :-)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <004601bfbddc$bfda6900$e619463f <email protected>>, faisal <email protected>
("Faisal Nasim") wrote:
> | Hi,
> | just a little comment:
> | A few posts ago I was worried about being unable to reference in
> | variable function calls (like $str="db->fooobj->woo"; $this->$str();).
> | But we found out that thereīs only the eval() way to do it.
> | Eval isnīt as slow as public thinks. I tested now and I use it to fill
> | multi-dim (between 2-6 dimensions) arrays based on a condition and Iīm
> | surprised, itīs fast. Perhaps a small note on eval()īs documentation,
> | what eval() actually does and when itīs expected to be slow would help
> | some users. I would provide my multi-dim-array-fill code snipplet as an
> | advanced use of eval().
>
> The only difference in eval() and regular code is that, the eval()
> code is directly read from a string and the rest from file (if not
> already read into a string). I haven't checked but I think its
> necessary to create a new buffer (yy_create_buffer(), default)
> to ask the lexer to parse it from a new location (a _very_ slight
> overhead).
The idea that eval() is slow probably comes from Lisp hackers like me: In
Lisp, the context required to correctly evaluate eval() is quite
expensive. Fortunately, PHP does not have the features of Lisp that make
eval() so slow.
I think the actual feature in Lisp has something to do with the dynamic
variable environment that can be passed around in Lisp, but don't quote me
on that. If you really need to know, the Macintosh Common Lisp Mailing
List (www.mcl.com) is a very good mailing list. (Or it was, when I was
there a few years back...)
-- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Richard Kurth: "[PHP3] Making my WebPages search engine friendly"
- Previous message: Richard Lynch: "Re: [PHP3] copying triangles in PHP :-)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

