php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #45195 ob_start handler chunk behavior written wrong
Submitted: 2008-06-06 21:04 UTC Modified: 2008-11-05 16:12 UTC
From: sv4php at fmethod dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Win
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sv4php at fmethod dot com
New email:
PHP Version: OS:

 

 [2008-06-06 21:04 UTC] sv4php at fmethod dot com
Description:
------------
The documentation of ob_start says that if chunk size is specified, then the handler is called on the first newline in the output.

This did not make sense since what if the output was binary and had no new lines chunking would not work at all, I tested and found that the handler instead "snaps" to the first boundary after an echo is performed.

I.e. each echo operation is atomic, so if I had a chunk size 10 bytes, and I echo '123456', '123456', '123456', '123456'; then the handler will be called with 2 times, with 12 bytes each time, although there are no newlines in the output.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-05 16:12 UTC] vrana@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

Duplicate of bug #42660.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Jun 17 19:00:01 2026 UTC