Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:126091
X-Original-To: internals@lists.php.net
Delivered-To: internals@lists.php.net
Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5])
	by qa.php.net (Postfix) with ESMTPS id 2ED7D1A00BD
	for <internals@lists.php.net>; Sun,  1 Dec 2024 22:25:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail;
	t=1733091754; bh=opQjxFWnBjA6gW5s1hOZ9dnh8mOxefmwo/sUDtNnY04=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
	b=TQ4CLMlwdxpXZgiNp2A40IC5AQaTTzccokdmP6w6ZM4KED1AnGsB2Qfdp3al//led
	 6UacG+4AP0ab6essxNtaiMN/UkMROGjoK3bwpFLu6wkxFM27A4eLppdQS4tP0Zy9f/
	 +yR4gH1bQeh2tCvc4bD+spFjYlvIA/4hT/HQqWWE9aeblLrHYFUzSQU6efSc1Xi43o
	 uIRAwYq2At4nZjwaG0m7EVwL8WF8r0o0BjFJoqeREku8pEiKKOtWPXBfORJdFbHE+N
	 2j864a6r+kJW45kjV0bfy68jGm6GuAp2QvY8aIUr/JIVhr6nTURLoW7s6VrVJJB7Mg
	 mlu84iSt+UEqg==
Received: from php-smtp4.php.net (localhost [127.0.0.1])
	by php-smtp4.php.net (Postfix) with ESMTP id 095DD18006F
	for <internals@lists.php.net>; Sun,  1 Dec 2024 22:22:33 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net
X-Spam-Level: 
X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_50,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,
	FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,
	RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS
	autolearn=no autolearn_force=no version=4.0.0
X-Spam-Virus: No
X-Envelope-From: <cmbecker69@gmx.de>
Received: from mout.gmx.net (mout.gmx.net [212.227.17.20])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by php-smtp4.php.net (Postfix) with ESMTPS
	for <internals@lists.php.net>; Sun,  1 Dec 2024 22:22:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de;
	s=s31663417; t=1733091936; x=1733696736; i=cmbecker69@gmx.de;
	bh=QmucQ8/xVkq+JU5vVOojWWT7+Kpf2MoPbQcX2PqqaFU=;
	h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc:
	 References:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding:cc:content-transfer-encoding:
	 content-type:date:from:message-id:mime-version:reply-to:subject:
	 to;
	b=Qdigt7Q19dXwHCzNcHUo9tV0dDHufvClOyn3zvMOW1/dB/Ai6wB5NgVQuSiYmvZe
	 C54uTOvOGozLq56AROUR4cxx30MH1Y8SczLUyHvF+5dUgyCW9wSdgui5MpsytQemp
	 ut9WzABqozFieexG9bouGAznc4qL+36+NZznPAMy+QyCNO+43GoUD1UYiU7SjfFoN
	 E/L/ARKk5uxFbRLXjghjYnjkL/cHYVAJEqgH/lZ81typXKOeWS/NC/pVCLtp6c3qE
	 teDQPXCvs12LwBbRoE4AraAIBQIgKmhhgwDjN8T6Pm8TAaGSNLWA+YZWoJ7AiEtsL
	 FukBOZTg+L6nd7nGSg==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from [192.168.2.130] ([79.251.205.37]) by mail.gmx.net (mrgmx104
 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MacOQ-1tpIGA1kr4-00jTYu; Sun, 01
 Dec 2024 23:25:36 +0100
Message-ID: <c21deef2-d743-4989-9e75-d2b6e5139fc7@gmx.de>
Date: Sun, 1 Dec 2024 23:25:37 +0100
Precedence: bulk
list-help: <mailto:internals+help@lists.php.net
list-unsubscribe: <mailto:internals+unsubscribe@lists.php.net>
list-post: <mailto:internals@lists.php.net>
List-Id: internals.lists.php.net
x-ms-reactions: disallow
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PHP-DEV] Re: Inaccurate documentation on return values from
 native functions
Content-Language: de-DE
To: Hans Henrik Bergan <divinity76@gmail.com>,
 "Christoph M. Becker" <cmbecker69@gmx.de>
Cc: mickmackusa <mickmackusa@gmail.com>, "Gina P. Banyard"
 <internals@gpb.moe>, internals <internals@lists.php.net>
References: <CAKVXxD-9=cv5M7DHs0FLZdLMy9Xe5+AcXYtd6iSEmY=9u1g4AQ@mail.gmail.com>
 <CAKVXxD9QX1DODPboY9=36Cb23t36hLAF-Fa_NAeN3xoWDXycPg@mail.gmail.com>
 <Re44EoZ2A4IxjpFiUp0ZFd0ybwLNe923wDGbJo2TfZ4UPQcAQHxX2XE-RB-IWtZFkK_rrPT6JQvss265WxXuf3RvMqjzd8pH1G_7DhiM1NQ=@gpb.moe>
 <CAKVXxD_yd6sUgM=mjYEPJ1jK6O760nr8pGwyEfFG8tYttsBN6A@mail.gmail.com>
 <f702b9b5-c414-43ba-9c23-7a5a04b7b0e3@gmx.de>
 <CAJmy8YEeFafHKRRZUWhd_rS-cDZ6dPnT=2PmO_PZfA5tM=z8UQ@mail.gmail.com>
In-Reply-To: <CAJmy8YEeFafHKRRZUWhd_rS-cDZ6dPnT=2PmO_PZfA5tM=z8UQ@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:YkpM8veKuTxo6KWnmdZF2vq9UBHCUlyNj2PmezWloX1g2z9sDDm
 VUWO+x0YVv1mCmOmR33OHbCDcX7VgNwhomihUa2PIIvFg1DrGE8/m5jKynmn6ngleBaYLrW
 H8TAMSJ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C9J8h5GHLyybTrErIs31KEW7QY4h4Hsv/8fSfalS+0Ky311c3LN4GIQ
 GhPSqK9wqsliqmugAXvUr7jb0ix+KjV8lZsfk9dz27Vm7JsRLGoS5hK9MM7Gmo9sNqZxC/JI0
 13xGceu/mMSy6IV2PErE3dtcX+wuhbcfWuKPO36PJWUU87MN6Gh4Peu9XZzkSLqA6FW2LhmIv
 k6vbzSpwRuYGMCU/poicEpLrkQVSm5
From: cmbecker69@gmx.de ("Christoph M. Becker")

On 01.12.2024 at 21:32, Hans Henrik Bergan wrote:

> On Sun, Dec 1, 2024, 20:12 Christoph M. Becker <cmbecker69@gmx.de> wrote=
:
>
>> On 01.12.2024 at 19:26, mickmackusa wrote:
>>
>>> On Sun, Dec 1, 2024 at 10:01=E2=80=AFPM Gina P. Banyard <internals@gpb=
.moe>
>> wrote:
>>>
>>> Will it not be that these functions will be altered in the core to do
>> what
>>> the documentation says?
>>
>> If the docs are not correct, we cannot simply change the source to
>> conform for BC reasons.
>
> The same way we can't simply stop curl_close from writing to
> CURLOPT_COOKIEFILE for BC reasons?  (
> https://github.com/php/doc-en/issues/2239 )

My main point was (and is) that the docs are *unfortunately* not
authoritative; they still contain lots of out-dated and probably also
some wrong information.

The secondary point was (and is), that we *should* cater to BC.  That
is, unfortunately, not always possible; in this case it's about the
resource to object conversion, which when completely done, will get rid
of some nasty problems, which currently can barely worked-around.  And
when we change a resource type to a class, we know that some code does
is_resource() checks which are no longer valid, and that the close()
functions are no-ops.  There was some discussion about is_resource()
returning true for objects previously have been resources, but if I
remember correctly, that has been rejected.  And wrt the close()
functions there is barely anything we can do; well, we could put the
objects in some kind of unusable state, and actually close the
underlying "resource", but that seems even more hackish than having
is_resource() returning true for some objects.

So, in the end it's about weighing the pros and cons.  And there are
always different opinions regarding the decision.

Christoph