note 34003 deleted from function.register-shutdown-function by didou
| From: | didou@php.net | Date: | Fri, 03 Oct 2003 11:21:31 +0000 |
| Subject: | note 34003 deleted from function.register-shutdown-function by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-57698@lists.php.net to get a copy of this message | ||
Note Submitter: rochlin@centralpets.com
----
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.