[php-src] Issue #16135: ob_start chunk_size 0/1 behave differently than any other value <4096

From: Date: Mon, 30 Sep 2024 16:57:31 +0000
Subject: [php-src] Issue #16135: ob_start chunk_size 0/1 behave differently than any other value <4096
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-247947@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/16135 Author: kkmuffme ### Description https://3v4l.org/fHmH7 The following code: ```php <?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_

« previous php.bugs (#247947) next »