Skip to content

ob_start chunk_size 0/1 behave differently than any other value <4096 #3815

@kkmuffme

Description

@kkmuffme

Description

https://3v4l.org/fHmH7

The following code:

<?php

function my_cb( $a ) {
    return $a;
}

ob_start( 'my_cb', 0 );
ob_start( 'my_cb', 1 );
ob_start( 'my_cb', 2 );

$status = ob_get_status( true );
var_dump( array_combine( array_column( $status, 'chunk_size' ), array_column( $status, 'buffer_size' ) ) );

Resulted in this output:

array(3) {
  [0]=>
  int(16384)
  [1]=>
  int(16384)
  [2]=>
  int(4096)
}

But I expected this output instead:

array(3) {
  [0]=>
  int(4096)
  [1]=>
  int(4096)
  [2]=>
  int(4096)
}

PHP Version

8.3.x

Operating System

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions