note 34012 added to function.register-shutdown-function

From: Date: Sun, 13 Jul 2003 22:07:15 +0000
Subject: note 34012 added to function.register-shutdown-function
Groups: php.notes 
Request: Send a blank email to php-notes+get-52038@lists.php.net to get a copy of this message
Need to call a static method with register_shutdown_function()? This won't work: register_shutdown_function('MyClass::MyMethod'); This will (obviously): register_shutdown_function(create_function('', 'return MyClass::MyMethod();')); Lambdas ("anonymous functions") are useful for all functions that take callbacks, so use them creatively! ---- 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+34012 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34012&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34012&report=yes

« previous php.notes (#52038) next »