[nycphp-talk] register_shutdown_function & parameter passing
Adam Maccabee Trachtenberg
adam at trachtenberg.com
Fri Sep 17 17:18:19 EDT 2004
On Fri, 17 Sep 2004, Fan, Wellington wrote:
> Is there any way one can pass parameters to the function registered by
> 'register_shutdown_function()'?
No, because you never know when it's going to be called.
> See, I was thinking that I need a way to 'lock' a resource for the duration
> af a script. I'd insert a record into a locking table with a unique userId,
> then the unlock function would be registered via
> register_shutdown_function(), THOUGH it would need the userID....
You may get in trouble here because if there's a fatal error, I don't
believe PHP will actually call any shutdown functions, but will just
abort ASAP.
-adam
--
adam at trachtenberg.com
author of o'reilly's "upgrading to php 5" and "php cookbook"
avoid the holiday rush, buy your copies today!
More information about the talk
mailing list
Automatic Email Organization without missing anything!