On Tue, 2004-03-02 at 20:49, Todd Ruth wrote: > I work for a company that is using php and would like to > contribute a few helper functions that we find useful. > They are most helpful for anyone doing OO work (especially > if using singletons) who isn't ready to move to php5. > Two of the three are trivial to incorporate, but > for the third I'm looking for some advice. I'm also not > sure if I should get a cvs account for this stuff or > if posting it here is sufficient inspiration for some > good natured soul to get the functions into php. :) > I'll start with the easy ones: > > ============ ref_id(mixed var) ============ [snip] > ============ ref_count(mixed var) ============
I agree that these could be quite useful, I just ran into a situation a few minutes ago where they would have saved me some time. > ============ (dis)allow_copies(mixed var) ============ What about implementing this directly in php? You could use trigger_error in the constructor to stop the script from executing if the object is instantiated more than once. -- Adam Bregenzer [EMAIL PROTECTED] http://adam.bregenzer.net/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php