Tie'ing variables

[email protected] (Sterling Hughes)
Newsgroups php.dev
Message-ID <1046535975.21516.1414.camel@hasele>
Hi,

Analyzing PHP's routines a bit, it seems that the slowest part of a
"generic" request is populating the special arrays, $_ENV, $_GET, etc.

I was wondering if it might be possible to "tie" these arrays to a
function (if you don't understand that, look at Perl for a definition). 
One could populate them as an overloaded object, and then array accesses
would work - I guess.  But I would prefer a cleaner mechanism.

This would prevent a costly overhead for elements that don't really need
to be there, and yield only a slight performance cost when accessing
overloaded elements in these arrays.

-Sterling

-- 
"The computer programmer is a creator of universes for which he  
 alone is responsible. Universes of virtually unlimited complexity  
 can be created in the form of computer programs." 
    - Joseph Weizenbaum
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.