[PHP-NOTES] note 130175 added to function.set-error-handler

[email protected] ("[email protected]")
Newsgroups php.notes
Message-ID <[email protected]>
Usually, this method is not called in a loop, but if it is, there is one thing that may be EXTREMELY important to think of, and that is to run `restore_error_handler()` once for each call to `set_error_handler`. Otherwise, you will have a memory leak. Every time set an error handler, even if it's identical to the previous one, you're pushing the previous one to a stack. 

We recently had a big crash due to this, and we had a very hard time finding out what the problem was. There was no error message or anything. Just a big crash.
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 213.115.8.221)
----
Manual Page -- https://php.net/manual/en/function.set-error-handler.php
Edit        -- https://main.php.net/note/edit/130175
Del: integrated  -- https://main.php.net/note/delete/130175/integrated
Del: useless     -- https://main.php.net/note/delete/130175/useless
Del: bad code    -- https://main.php.net/note/delete/130175/bad+code
Del: spam        -- https://main.php.net/note/delete/130175/spam
Del: non-english -- https://main.php.net/note/delete/130175/non-english
Del: in docs     -- https://main.php.net/note/delete/130175/in+docs
Del: other reasons-- https://main.php.net/note/delete/130175
Reject      -- https://main.php.net/note/reject/130175
Search      -- https://main.php.net/manage/user-notes.php
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.