ID: 45525
Updated by: [EMAIL PROTECTED]
Reported By: david at grudl dot com
-Status: Open
+Status: Assigned
-Bug Type: Feature/Change Request
+Bug Type: Scripting Engine problem
Operating System: windows xp
PHP Version: 5.3CVS-2008-07-16 (snap)
-Assigned To:
+Assigned To: dmitry
New Comment:
Dmitry, could you have a look please?
Previous Comments:
------------------------------------------------------------------------
[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