Doc #75256 [Com]: Default value & proposed values for flag parameter don't match type declaration

From: Date: Mon, 25 Sep 2017 21:13:43 +0000
Subject: Doc #75256 [Com]: Default value & proposed values for flag parameter don't match type declaration
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14996@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75256&edit=1 ID: 75256 Comment by: theseer@php.net Reported by: hw at hollo dot me Summary: Default value & proposed values for flag parameter don't match type declaration Status: Open Type: Documentation Problem Package: Documentation problem Operating System: Ubuntu 16.04. LTS PHP Version: 7.1.9 Block user comment: N Private report: N New Comment: This seems to be more than just a documentation issue and looks almost like a duplicate to https://bugs.php.net/bug.php?id=74889 Previous Comments: ------------------------------------------------------------------------ [2017-09-25 21:02:48] hw at hollo dot me Description: ------------ --- From manual page: http://www.php.net/function.ob-implicit-flush --- The parameter type declaration of $flag is integer, but its default value is described as TRUE. Additionally the proposed values for $flag are TRUE and FALSE in the documentation. According to the source https://github.com/php/php-src/blob/c61cea7135f882b9cddef4a7e1a6ce8d51fedd61/main/output.c#L1521 the parameter is defined as an integer. When using strict_type mode and passing TRUE or FALSE a TypeError is thrown: -- PHP Fatal error: Uncaught TypeError: ob_implicit_flush() expects parameter 1 to be integer, boolean given -- Tested on current PHP 7.0.23 and PHP 7.1.9 in CLI and FPM mode. Test script: --------------- <?php declare(strict_types=1); ob_implicit_flush(true); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=75256&edit=1

« previous php.doc.bugs (#14996) next »