|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-07-16 07:23 UTC] derick@php.net
[2008-07-17 09:55 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 04:00:01 2025 UTC |
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.