Doc #75256 [NEW]: Default value & proposed values for flag parameter don't match type declaration
| From: | hw at hollo dot me | Date: | Mon, 25 Sep 2017 21:02:55 +0000 |
| Subject: | Doc #75256 [NEW]: Default value & proposed values for flag parameter don't match type declaration | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-14995@lists.php.net to get a copy of this message | ||
From: hw at hollo dot me
Operating system: Ubuntu 16.04. LTS
PHP version: 7.1.9
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Default value & proposed values for flag parameter don't match type
declaration
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 bug report at https://bugs.php.net/bug.php?id=75256&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75256&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75256&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75256&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75256&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75256&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75256&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75256&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75256&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75256&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75256&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75256&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75256&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75256&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75256&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75256&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75256&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75256&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75256&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75256&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75256&r=mysqlcfg