Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120615 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 46626 invoked from network); 19 Jun 2023 07:56:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jun 2023 07:56:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 78784180003 for ; Mon, 19 Jun 2023 00:56:54 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS8075 40.80.0.0/12 X-Spam-Virus: No X-Envelope-From: Received: from AUS01-ME3-obe.outbound.protection.outlook.com (mail-me3aus01olkn2171.outbound.protection.outlook.com [40.92.63.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 19 Jun 2023 00:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MbWFPxJyoowJzctoC0CQGpgK60/fUPbpJRH4sEBvCHdH3sofQFMCKyfcJmeqbG5bz1muoyjJP6tWyr5IDeQv0zpl79CfIyXJl2pmaQOGl08UOEn68sMKK6xCNIS/AAIQtz+saulNXZgefMOCOuxPEdYAsE+a3aOdwniDN0tjS6A13Zb1wNHH3SnOwky+9iT9ykGhaSyfB9c7561TnvL8TBrUwfYgll9gvclYurP9t36E8qvcw/ZuRhzFeRnA0h4MYP1Xf3XKS4v3++qaFwqfWs4o4+9huDXv9s53DeBZP68/Cwy5tZulG4e4Jwk0IbnV13BXibz/tSg5oMoEru7tvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=K4LdPYZJX5DDjAuRgSQt6QRCMRJoNc/CU5yx2QdRKKw=; b=DGpD3VCR9M1oJGj8YLJNQ9AJvjNMWDeGuiTsGwvhbcxrCiSqPtbHX2DyO9tsn8jF196xGKFYmFs730xhhese/Ptrtt5wBigBTQFyx6llYkfXllgbbyU2tNl4ojk08hJVvRDxuzpWR34029+oHB4/CDM9K2+lPjN4dRGDiVouDjSuUhSkdTB0MWuUg/nEFv2wZbWeCn5Hl2vVtW07T0xAZeld2LC9Ig88iJzXArFwexkodU9OFNGsAzvckenpmbUPrsTMDSvmqmJY8HARJT3C0ITtsxwatSGKeV1CJzed5esSt7er6WQQC/XymfnLfz8NHFnPpHh4b1D2Cp+hswcmng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from SYBPR01MB6063.ausprd01.prod.outlook.com (2603:10c6:10:9d::5) by ME3PR01MB7176.ausprd01.prod.outlook.com (2603:10c6:220:16f::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.36; Mon, 19 Jun 2023 07:56:49 +0000 Received: from SYBPR01MB6063.ausprd01.prod.outlook.com ([fe80::e16a:2358:5d69:508b]) by SYBPR01MB6063.ausprd01.prod.outlook.com ([fe80::e16a:2358:5d69:508b%4]) with mapi id 15.20.6500.036; Mon, 19 Jun 2023 07:56:49 +0000 To: "internals@lists.php.net" Thread-Topic: Request to create a RFC for const args Thread-Index: AQHZooLDfuu8Z1gVfU2UyRy6AZ1ebg== Date: Mon, 19 Jun 2023 07:56:49 +0000 Message-ID: Accept-Language: en-AU, en-US Content-Language: en-AU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [1+TNEIKgLkAselLp6wnv5KjcW9/x48qj] x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SYBPR01MB6063:EE_|ME3PR01MB7176:EE_ x-ms-office365-filtering-correlation-id: e49997d9-6716-4d8a-d1e9-08db709abcc5 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: y1s3N3FMMkfqDAd9gVbKSm9vlp3+y5Tk5yeI61yldnjOAN/qT7CDAF0dl2Tt+50XfnOdIsBSG/7gWS2Zu9wgjlbRzNjwZWsa1ON+d8t1hvfbX2SFQ6SY/6AYmXP6NJ4e6c5+/vC2lXuXRI9rFyyVVQl3J1+kivMkWmsqqJM4A39FxRjmdX+YycKxCh1eswqoRNTAVbfW0ygTA+FbCxnsipSCi953lzOEP9RcYpNT0pzAt0B0pBuoc0dS0HFuvewNqOwjWd2Lp1v/XypuvXUTYoWuNZcBELmCHoZEuA8KHT1FO55FKXEDAJhLiuCkmXPbcNlMB7JLBZTXJdlQULIxh7k9qWfjqG21SPqEik9RGFQ5Z+dOdGgeCcO4CLAsfu7jSL805lcmBO/PDUmpoh8VHBEVin794p/fPml3prEIh85oxDmNjUmWSTmO31UFC8Rmq2vDXRey2OarXlsgsKlbYACWbMcoB4XLy0yYB+OMMKbb+Yr9nGCgBAp0p2ruNV48OSB92qddFDPy5oTSEWtSTLMbkht1yOD2T3C2+hUbUZ26APMvqetFIcOV2E95iu0M1ebaf2soZb6qrFHCt0yODXYsYIS8wH67/+F11wivECs= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vMb1xMYH4Tq0pJK9lsoVtkTyp1WZXXmZu58zAHmNJdhbqlCs0f3UfVnrFqol?= =?us-ascii?Q?coMzA5p7YO92kOTTopAtPsReFFgXO0kjan2XwjO8L8pFBS4mz3XvKAgdf6Lo?= =?us-ascii?Q?0FkavNi06mJa7Wxi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O3D?= =?us-ascii?Q?DMupBfsz2FwDwZdPgCcugu0fud5XH0Fm2tCtwxTQyEWfoys1ZcAUOCj+xNEP?= =?us-ascii?Q?RPkziMO6Xj9WecOdHWqQxWzT71KeaMGyGoZ2EzEv4+Lavh89vkbKQ2tE/ixa?= =?us-ascii?Q?yr1h5ju7WL/tplhHDebvSkVPtGiRwFKVMWziWx2PtubpwgGf4C657BL9bRS+?= =?us-ascii?Q?rIlj7lliu+LeT28d6YTGJ2vNggt3evrkp7SuRN4ysFBr20oaC/IvoPyl6Knp?= =?us-ascii?Q?FGD8F0b2PouFgRDmZXFZ?= Content-Type: multipart/alternative; boundary="_000_SYBPR01MB6063A87307EE2612396D0199B95FASYBPR01MB6063ausp_" MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-f49ba.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SYBPR01MB6063.ausprd01.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: e49997d9-6716-4d8a-d1e9-08db709abcc5 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Jun 2023 07:56:49.7130 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: ME3PR01MB7176 Subject: Request to create a RFC for const args From: s.mcdonald@outlook.com.au (Sam McDonald) --_000_SYBPR01MB6063A87307EE2612396D0199B95FASYBPR01MB6063ausp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello php internals team, I would like to put forward an RFC for a new feature. I am a long time user= , but have never participated as yet to the RFC. This is my first step to gather reaction/feedback from the team. I would be happy to implement the feature and post a PR or have someone fro= m the team implement this. The feature I want to put forward is "const function arguments" (same for m= ethods) This feature is available in cpp, and I believe would be a benefit to the p= hp community. My RFC would fully detail and clarify what this is and how it works. This feature allows the user to specify "const" on a function arg, so that = the argument while in a function can not be reassigned. The following example would throw an exception at compile/runtime. ``` public function foo(const int $bar) { $bar =3D3D "buz"; } ``` The same for complex types such as arrays and classes, if a 'const' arg is = provided, while in the function it can not be reassigned. Please let me know if this is something the team is interested in and if I = should proceed. Kind regards. Sam McDonald. Sent from Outlook for Android --_000_SYBPR01MB6063A87307EE2612396D0199B95FASYBPR01MB6063ausp_--