ID: 45525 Updated by: [EMAIL PROTECTED] Reported By: david at grudl dot com -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: windows xp PHP Version: 5.3CVS-2008-07-16 (snap) Assigned To: dmitry New Comment:
This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2008-07-16 07:23:52] [EMAIL PROTECTED] Dmitry, could you have a look please? ------------------------------------------------------------------------ [2008-07-16 05:25:38] david at grudl dot com Description: ------------ Lambda functions and closures are AWESOME! But they are not still supported as ob_start() argument. Reproduce code: --------------- function redirect($file) { $handle = fopen($file, 'w'); ob_start(function($buffer) use ($handle) { fwrite($handle, $buffer); }); } redirect('output.html'); echo 'Hello World!'; Expected result: ---------------- Should work Actual result: -------------- Fatal error: ob_start(): No method name given: use ob_start(array($object,'method')) to specify instance $object and the name of a method of class Closure to use as output buffer. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45525&edit=1