Re: Overwriting (internal) functions
| From: | Zeev Suraski | Date: | Mon, 28 Aug 2000 16:39:52 +0000 |
| Subject: | Re: Overwriting (internal) functions | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-30985@lists.php.net to get a copy of this message | ||
We discussed this ability in the past. Even though it may be fairly easy to implement it (even though as usual, it's tougher than it looks) - it was generally accepted that this was not a good idea. If people expect a certain function to perform something, letting users overwrite it with new functionality (e.g., inside libraries) is going to cause lots of confusion.
Zeev
At 16:42 28-08-00, Wico de Leeuw wrote:
Hiya Anyone who can thing of more thing you can do with overwriting (internal) functions? (To convince Andrei the use of such a thing) Please let me know Greetz, Wico At 08:41 28-8-2000 -0500, you wrote:-- Zeev Suraski <zeev@zend.com> http://www.zend.com/Yes, I got it. I still wouldn't see myself personally using it, for example, so you'd probably need to post this to the list.. On Mon, 28 Aug 2000, Wico de Leeuw wrote:Hiya Did you get this mail? and did (does) it include enough arguments? Greetz, Wico At 16:35 25-8-2000 +0200, Wico de Leeuw wrote:At 09:11 25-8-00 -0500, you wrote:1 : register_shutdown_function won't allow output if i can overwite die and exit (return?) i have a custom register_shutdown_function with output 2: header Ob fuctions still can't get the current headers (and change them) (requested as feature) if i can replace header i can parse the headers (add sid for example) before i output them 3: debugging you can easly build debuging function without putting echo or a function call b4 everting you want to debug (think of sockets) you can replace a fput with a custom that outputs it to screen and to the socket 4: Make easy layers for things situation: you just changed you msql server to mysql (suppose you can't do a search/replace) and you don't want to rewrite all your programms you overwrite mssql_* to mysql_* problem (almost) fixed 5: fill in here i guess the are a lot more options users can think of ask them and be supprised Still not convinced about the usefullness ask and i write a dozen other reasons P.S. Sorry fot the many typefaults :) Greetz, Wicohmmm You got a point there, but whould be nice thoughOn Fri, 25 Aug 2000, Wico de Leeuw wrote:I don't really see what it would be nice for. Perhaps, you can write down several situations.Maybe a special Function you gotta call first on a page to allowthe pageto use overwritten function(s) And a option in php.ini to allowit on allpages (default off ofcourse) And with compiled liberies you keep the problem that you don't knowcan dowill do I can register an shutdown function (or even when you include itwhat itthings)wich collects some stuff and still emails it to the author-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.netpassword for the current dir if not empty) you will never notice it(user and-Andrei * The best source is the source code. *-Andrei * Think digital, act analog. *-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net