Page 1 of 1

register_shutdown_function

Posted: Fri May 21, 2004 10:24 am
by tioadri@hotmail.com
:?: Hi Gurus!

I'm trying to use register_shutdown_function, and it works nearly fine. On execution end, php calls my registered funcion, but it cannot access property variables set in others functions than constructor. For instance, I have a database access class, and on shutdown I want to commit or rollback depending on value of $this->err. Although, if I call my shutdown function from client page, It works fine. But if I let PHP calls it on end of execution, $this->err always have same value set on constructor function.
I'm running Php 4.3.3 on Linux Red Hat.

Does anybody knows why? Thanks for any help!

Posted: Fri May 21, 2004 11:42 am
by launchcode
Post your shutdown function - it's probably just a scope issue.