Edit report at https://bugs.php.net/bug.php?id=60243&edit=1

 ID:                 60243
 Comment by:         artificialmagic at hotmail dot com
 Reported by:        artificialmagic at hotmail dot com
 Summary:            Add way to specify output buffering chunk size of 1
 Status:             Open
 Type:               Feature/Change Request
 Package:            Output Control
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

Here's a proper test script. This produces [4096][4096][4096][4096][4096]...

ob_start(function($x) { return '[' . strlen($x) . ']'; }, 1);
for (;;) echo '.';

So I'd like this to produce [1][1][1][1][1][1]....

ob_start(function($x) { return '[' . strlen($x) . ']'; }, -1);
for (;;) echo '.';


Previous Comments:
------------------------------------------------------------------------
[2011-11-08 15:16:14] artificialmagic at hotmail dot com

Description:
------------
ob_implicit_flush does not do anything in CLI. This script never produces 
output:

ob_start();
ob_implicit_flush(true);
for (;;) echo '.';

A 1-byte buffer would work around it, except that specifying a chunk_size of 1 
to ob_start is taken to mean 4 kilobytes. As a workaround, please make a 
chunk_size of -1 to ob_start a synonym for a real 1, so that output buffering 
can be used for filtering or for redirection without actual delay in output. 
Currently the smallest size that can be specified is 2 bytes, which can cause a 
potentially infinite wait for an extra byte.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60243&edit=1

Reply via email to