Re: [PHP] register_user_func and register_shutdown_func

2004-12-15 Thread Bostjan Skufca @ domenca.com
It's ok, I discovered that object (if not passed by reference explicitly) is first duplicated (internally) and only then the method is called. Proof code: ?php class myCls { var $myVar; function myCls() { $this-myVar = 1; } function myInc() { $this-myVar++; }

[PHP] register_user_func and register_shutdown_func

2004-12-14 Thread Bostjan Skufca @ domenca.com
Hi all, is there any internal difference between following calls (they occur inside some class)? #1 register_shutdown_function(array($this, 'myfunc')); #2 register_shutdown_function(array($this, 'myfunc')); (note the reference operator in #2) Or is parameter $this in example #1 forced to be