note 34003 added to function.register-shutdown-function

From: Date: Sun, 13 Jul 2003 14:39:21 +0000
Subject: note 34003 added to function.register-shutdown-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-52025@lists.php.net to get a copy of this message
register_shutdown_function(string) is the more accurate prototype. The parameter is a string containing the NAME of the function. e.g. register_shutdown_function('foo'); and NOT register_shutdown_function(foo()); where you've already defined foo somewhere. So far as I can figure, you cannot pass foo() any parameter. e.g. register_shutdown_function("foo('bar')"); gives me an error. As does register_shutdown_function('foo($bar)'); I have no idea what type is returned by register_shutdown_function. Seems like something nice to include in the manual. Since I wanted to call a mysql_query('ROLLBACK',$connection) I had to define a special function that didn't need an explicit $connection parameter just for the purpose. I hope I'm wrong about this, but no Googling revealed any examples that showed different. ---- Manual Page -- http://www.php.net/manual/en/function.register-shutdown-function.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34003 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34003&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34003&report=yes

« previous php.notes (#52025) next »