|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-02-09 14:37 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 20:00:02 2026 UTC |
Description: ------------ Is it possible to use register_shutdown_function(array(&$this,"Destructor")) inside other function? Reproduce code: --------------- class A { var $val = "A"; function A() { register_shutdown_function(array(&$this,"Destructor")); $this->val = "B"; } function Destructor() { print $this->val; print $GLOBALS["obj"]->val; } } $obj = new A; $obj->val = "C"; Expected result: ---------------- CC Actual result: -------------- BC