|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-07-21 02:08 UTC] deadman_great at wlp dot ru
[2005-07-21 02:16 UTC] tony2001@php.net
[2005-07-21 04:59 UTC] deadman_great at mail dot ru
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Description: ------------ __destruct() not called on unset() if one of methods used as callback for set_error_handler() function. Reproduce code: --------------- class Sample { function __construct() { set_error_hanlder(array(&$this,'OnError')); } function __destruct () { echo '[DESTRUCT]'; } function OnError ($a,$b,$c,$d) { echo 'Error'; } } $sample = new Sample(); echo '[BEFORE]'; unset($sample); echo '[AFTER]'; Expected result: ---------------- [BEFORE][DESTRUCT][AFTER] Actual result: -------------- [BEFORE][AFTER][DESTRUCT]