register_shutdown_function

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tioadri@hotmail.com
Forum Newbie
Posts: 1
Joined: Fri May 21, 2004 10:24 am
Location: brazil

register_shutdown_function

Post 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!
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Post your shutdown function - it's probably just a scope issue.
Post Reply