Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107723 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30409 invoked from network); 28 Oct 2019 17:28:21 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 28 Oct 2019 17:28:21 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 2FAA42CB91C for ; Mon, 28 Oct 2019 08:15:44 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8560 212.227.0.0/16 X-Spam-Virus: No Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Mon, 28 Oct 2019 08:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1572275741; bh=4to+lDv4HwQPwkx5VJNQrVcADSq2YtAeoT3/tdmyIEw=; h=X-UI-Sender-Class:To:From:Subject:Date; b=IcorEhPWOPMyuWpNd5A/2IZbUVL89ytV4Yk397qe0haJe+lqGNXMgzqfDzyTsZPEL jFhfXVwNKtZjecYvFXpkJgvMV+8mt3TWmaEodcok0ndwLnIsj0laMmuz2vlLwhTjuD qRJ1IiRBbx9eNkzRVsi1UxgAOivVxoRwt+Gl3q2Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.2.144] ([84.179.245.97]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmUHj-1hh0dI1MYL-00iTzB for ; Mon, 28 Oct 2019 16:15:41 +0100 To: PHP internals Message-ID: Date: Mon, 28 Oct 2019 16:15:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:r4WhSWzqkD6CTTIL7uxAStWr/ZWNwFDnwhrlvto6/uLaKSrTkye eKjk//rIE1W1FtfvNlPYrVqdYgGPLm9N7dWZliKdHqheud0wFdsXIs8PbmUONN/qoOU065a UGurZmYj099Sol2aBI+ujnFTeZLxmdeSwFpaXAKUAOWor4PxmQbYx8+X4d1GkSanEB64m1/ EpLWp6w82T5CsSY5wu47A== X-UI-Out-Filterresults: notjunk:1;V03:K0:HwcbzU5eGco=:0XOIDXZzG79GkNbEk25nDG XRWF2+ZP/tgOV8hyCAxK5D0Av9545da4VU/z2vz6shihdJvzmci2tJX5GOsfRFbWq6Uly9uBz BIb6QVg5WfMBeiRKIxmgF0bfBSngw7Gs9WEDFwieO/vwqjNPq527/UqLim3SOY15hvvTs2GQg a08nKcWVCxdp7v1HQwfT1dloC6XcpcEury/h4kJl2tkXgknyN9FR494KXH/21o6Ze7pZHWA0u h0jrKbLgCjuK3Wpky+EYcJVFzex8mFw8sWWWdy9W6caEIP72p77PVf6cRwolM/5CSkf9HP8SF YrEb4hUjzADM3WdoOv30T70aGTUia3mX/94uurO5oaRXxa2YokyHSLY4XVNTD8i3GB8eIiMMV 4DJLF42bjaUauqFHhv/8N+RdD8r/sP6M7tRO3gtvT2Hi0ecV32LKJvyXxMl/KdJ3LZo0EY7TG aWEbkqDh4Mv03Yzo8iC1iMO0Q3KRxnpIDv+tYscVVB+E+gCWJnZQBFN8xu2YUMe0pEQj75ua6 gnuf8+YoP04epVHw9w9X9myzF53zFDTN5BJCd0iBssNQ0oYZKj55OmDSWXKiVErgEpaXOMNK1 jd+KDYO+Mm9UNuk3O6up16iaf1U6Y49npNCAu5uDL68mtoGy0hW+x30itSupCsALD5czO+YGP cRBq1TiFCfHe07VRchDfaQiEEPJjjjs+DkCdlq5zGAbECZ0rm2nmEV/98zJAL1rpXBpDJPAxR WT1Ai8la5D7yhhmXoJ2/GBGZE/RmIAlr7CAybRuzH9Wyb8F3/eOTOmuwSdUb310Fd9Uq0qBTa weI7VD6sGp11qwUCSBsM0yDGN1Cc9e9mYYNUx357YpnV5Zaffg8iA11QtC32bUbQkKFMrj9WE wsWkKBr0O7qGijNHtXvT5DJ8UkS1LnbNgomvmawTmNwv0h37cNKSHwupRTQypn9qN/Skpb62M dTPqDRfPnBSpCDDQ4IRQZlYxfFlfawxoB23m5d3Y/BHN2x5UUIfv7/yYNfCoTgH4lHmPv79aZ fzja3Qs2u0YvDW49WJh7CPGHtHh1wiqsTf6fR8WB7PRCpDqim+eg9cU706K0gILZ4quI0oQW0 rLlf4iW5BKaUjedqcjNHLZdkSp0idciVCgYq7lCFGFWpcUAEBQdCT9pMoW4iy7HANS6tpC/LU kNPqObJ5W7F2tUSil5FMgFE+Gsrcl2tp/u9ZvuOyP1mTJqditCWEDk48sgH7CFdQIlHEwRazu iOkjcG0Od/6rx3seaUo8syQXpIUtWxxy1mjvkV+/oiIMeoQqk/Mo+NhJwJMk= X-Envelope-From: Subject: Sloppy parameter handling of some reflection methods From: cmbecker69@gmx.de ("Christoph M. Becker") Hi, while working on the arginfo stubs for ext/reflection, I've noticed that several methods do very sloppy parameter handling, if called for static properties/methods. ReflectionMethod::getClosure(), ReflectionProperty::getValue() and ::isInitialized() don't do any parameter checks at all, while ReflectionProperty::setValue() accepts arbitrary zvals as first parameter, and simply ignores the argument. If we wanted to be extra strict, we could do zpp_none() checks for the first three methods, and only accept a $value argument for the fourth. For BC reasons as well as simplifying code which deals with non-static properties/methods as well, we could also support an optional NULL, and maybe even an (arbitrary) object of the respective type. Thoughts? Thanks, Christoph