Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113392 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 23573 invoked from network); 4 Mar 2021 22:02:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Mar 2021 22:02:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D270D1804D0 for ; Thu, 4 Mar 2021 13:53:43 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 4 Mar 2021 13:53:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1614894817; bh=n624yIWiRFNpJbNkuLMoZhxrcqdahXnjApFBuQG0ANo=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=C8qo5dqo5uigbV85ku59Qx6BaHNSxWsTjJgxV6ESo2aKDJ0J4KlqQ8n3SkWZHNRPb YxhDcHxtmq69dcR2Sjjhj8Yq7EVBgFJm4+k64i6VLEMAjRQmialnKMqVwX6h1Mf+Oh 7avuZ/gDg/vh/5NB0x9JO1edrOa2KOquF0T8IVTg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.130] ([91.8.160.94]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGQj7-1lYBC93NGP-00GpM6; Thu, 04 Mar 2021 22:53:37 +0100 To: "G. P. B." , AllenJB Cc: PHP internals References: <2dcc41aa-6518-baf1-5548-de0c41e0a8f3@allenjb.me.uk> Message-ID: <8e32e4bb-2a0b-8607-c541-ccf2c5ba362a@gmx.de> Date: Thu, 4 Mar 2021 22:53:35 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:R/IGQrwEsaYSAj+utC+I7Bs36JzeyX4uHl64VptAu7ItVlz5iop gZBQU1EZcxoM6k8UakRIWa4nwWU97864pgA7gn0IvhI1d/MMa5Qz78GVp7OwFJshUsDeQKe 33ocqdlP2GZp4eE4/PXl1FHBXaUbZs4wYmT2tjFmvI60IstGTLb1M/BOLHyvE3ksRphZZ2W MBQFc5VZtXZqLeTpar04w== X-UI-Out-Filterresults: notjunk:1;V03:K0:xWsCA2LlcJU=:5zw7cL27bnysBVuMv3Gd0y MG02Wi+L3+FgrkPVP+LFAep8kt8UtXSNiCakA8SZLiTTxd7cGf9ELrfiYcITJliQX4rcHcy4G ybK4EUmk3N39qmIiUHxwlW9X/4E6UR6Pd3Ijefritvx6Q0qWfx59oalaCMZEDdQflOwh5W3b6 chrpaEZ3EgXGQFqyKiZCBokcrcU4DjoCSuxTnFbnlc0S/Axlm1+CShrzdvy/0PrXDd5q1J3bP ScNMZOXs84p/VxEzqnRwqU3ORJTILmhaYcp87chhofUg7Ru+Hm5B415nqC3HUi433UWnC1+zc oY8zKCt3UqIe3eLbxZPajqMBX9OFJNQDrUnOprdjLpCYtg3oBg99Awx8hHuYDHpaFmQ6eQLWK tt9HfPy8pHCotXJCLAbHzdfcRqOiefg02eO5+0H43RHIVUCyske0YNG4wp1oHxanI+g0KFil/ mZ9ABTF9RFrG7O5QzMRrmuRubmZroDH8a6ueFLLooE89TIfqzC85/kXXCvaXX6jse8vrWcw+U BHk6+9+Elgk1HWluQJ9ZOG4f6NnzOn0BL5xi8qpnhAYZ21A1WV2A+y8nTYeCixHu8u5vtozgO qOPXKcnDGC0TYpd4YujJ5eT5zDnYPQlYehwiNFF1hFwg5Xu4480+7uUudM1b+/vhjyXnFdq7q SBsRHUmThLgKjEUQKPo5xMC1ncRFAP83UFmil8Av3nq7FsvcDsFHhuuLKPVDB7RDUjcqaLLZI uUzzseZbdOcwsSCdH75khPlFqspXnPvbNtj6ho8GEdiICZeCfxWdqYSc5pJ6/M2HY0y/5GSFp uFcXp6bU2IlUSLy/0BaJDifVrUfXd7rL3AKeWVNS1T7Zym90H6q+9wdIgQDcjpv3mxe+49c99 ECFq1gUEOEl6INKV2EIQ== Subject: Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions From: cmbecker69@gmx.de ("Christoph M. Becker") On 04.03.2021 at 18:46, G. P. B. wrote: > On Thu, 4 Mar 2021 at 16:06, AllenJB wrote: > >> On a related note I dislike "documentation burden" as an argument >> against improvements. I obviously understand "open source, volunteers, >> translations, etc" but I've heard this a few times now as an argument >> against fixing various issues (another example is that many functions i= n >> the manual document that they can return false, but there's absolutely >> no explanation as to when this can occur except a single paragraph that >> lives on its own page that nobody is ever likely to find if they don't >> already know it exists and you can't tell which functions it actually >> applies to even if you do). Obviously the project doesn't, but if you >> followed this for everything (to the extreme), you'd never introduce an= y >> new functionality because it would mean adding more documentation pages= . >> If this is an issue, does the project need to consider if there are >> better ways to handle documentation? >> > > The matter of fact is that at this time there is mainly 1 person which > solely > works on the documentation, and that is Christoph M. Becker (aka cmb) > with some occasional contribution from other individuals (me included) > even with an issue tracker we are far from having all the changes for PH= P 8 > documented, and even some PHP 7 behaviour is not documented. > So documentation burden is a thing, should it prevent feature additions = to > the langage? Obviously not, and we mostly deal with this "just" fine as = for > the docs of the major PHP 8 features were written by their respective RF= C > authors. > > A big reason why there was no documentation for false return in the > signature is that until recently we did *not* have the capability to dis= play > union types via the Doc render (PhD), this is now being corrected but is > a tedious job of syncing the docs from the officials stubs to also sync > named arguments. Allen's point is about the undocumented return values when calling functions with unexpected parameter types (e.g. calling strlen() on an object). There has been quite some discussion about this over the years, mostly on the docs mailing list, and I still don't think this should be documented for each function individually, because it is by definition *undefined* behavior. If it was defined behavior, we could not have elevated this to TypeErrors in PHP 8.0 due to the massive BC break. The fact that this documentation would take years (assuming the current bandwidth) is secondary. Regarding syncing the docs form the official stubs: M=C3=A1t=C3=A9 did a g= reat job of semi-automating this, so it isn't *that* much work anymore, but in my opinion it is important to also keep the documentation correct for PHP 7, and this requires a lot of manual review, and not rarely looking up the actual behavior from the implementation =E2=80=93 that is quite some w= ork, and the reviewer's constant reminder how incomplete and out-dated large parts of the manual actually are. =2D- Christoph M. Becker