Bug #80413 [NEW]: TypeError: docs says param 4 of sem_get() is bool but PHP says int

From: Date: Wed, 25 Nov 2020 08:33:37 +0000
Subject: Bug #80413 [NEW]: TypeError: docs says param 4 of sem_get() is bool but PHP says int
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18151@lists.php.net to get a copy of this message
From: cmanley at xs4all dot nl Operating system: Debian 10 PHP version: 7.3.24 Package: Documentation problem Bug Type: Bug Bug description:TypeError: docs says param 4 of sem_get() is bool but PHP says int Description: ------------ The documentation says parameter 4 of sem_get is a bool (bool $auto_release = TRUE), but when calling sem_get using true as parameter 4 in strict_types=1 mode, then PHP throws a TypeError: "sem_get() expects parameter 4 to be int, bool given" Exact PHP version I'm using: PHP 7.3.19-1~deb10u1 Previously, someone reported that the parameter wasn't documented (see bug #51045). Now it's documented, but either the documentation is incorrect or the implementation is incorrect. Test script: --------------- <?php declare(strict_types = 1); $semkey = ftok(__FILE__, 'R'); $semid = sem_get($semkey, 1, 0666, true); print "OK\n"; Expected result: ---------------- OK Actual result: -------------- TypeError: sem_get() expects parameter 4 to be int, bool given -- Edit bug report at https://bugs.php.net/bug.php?id=80413&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80413&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80413&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80413&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80413&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80413&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80413&r=support Expected behavior: https://bugs.php.net/fix.php?id=80413&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80413&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80413&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80413&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80413&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80413&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80413&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80413&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80413&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80413&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80413&r=mysqlcfg

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