Doc #78142 [Ver->Csd]: Function prototype return value does not contain type in case of failure

From: Date: Thu, 29 Oct 2020 16:28:10 +0000
Subject: Doc #78142 [Ver->Csd]: Function prototype return value does not contain type in case of failure
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-18050@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78142&edit=1

 ID:                 78142
 Updated by:         phpdocbot@php.net
 Reported by:        mail at marcus dot haase dot name
 Summary:            Function prototype return value does not contain
                     type in case of failure
-Status:             Verified
+Status:             Closed
 Type:               Documentation Problem
 Package:            *General Issues
 Operating System:   Irrelevant
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=e4f3cc7f4cb861892d1f45cbb4a8cae1b7653e5c
Log: Fix #78142: Function prototype return value does not contain type in case of failure


Previous Comments:
------------------------------------------------------------------------
[2020-10-17 22:11:28] cmb@php.net

The following pull request has been associated:

Patch Name: Fix #78142: Function prototype return value does not contain type in …
On GitHub:  https://github.com/php/doc-en/pull/155
Patch:      https://github.com/php/doc-en/pull/155.patch

------------------------------------------------------------------------
[2020-10-17 13:32:54] cmb@php.net

Update: the current stance is that such issues will be fixed, when
proper support for rendering union types[1] is available.

[1] <https://github.com/php/phd/pull/30>

------------------------------------------------------------------------
[2019-06-13 08:34:27] mail at marcus dot haase dot name

So, the docs will stay wrong, because there are too many errors?

I always held the php documentation in high esteem, I hope, this is not goint to change.

------------------------------------------------------------------------
[2019-06-11 14:29:59] girgias@php.net

This "issue" has been raised multiple times already and the current stance that I'm
aware of is that the doc will not be changed to encompass false as a return value in the prototype.

The main reason for this is that there are so many functions affected that it is unpractical.

------------------------------------------------------------------------
[2019-06-11 11:36:55] mail at marcus dot haase dot name

Description:
------------
The return type for mb-strpos is declared as int, although it can be either int of false, as is
explained in the text of the documentation later on. To somebody reading only the call-description
but not the textual description, this is misleading.

---
mb_strpos ( string $haystack , string $needle [, int $offset = 0 [, string $encoding =
mb_internal_encoding() ]] ) : int
---

---
From manual page: https://php.net/function.mb-strpos
---


Test script:
---------------
Irrelevant

Expected result:
----------------
Remove the PHP7.1 return type



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78142&edit=1


Thread (6 messages)

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