Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119673 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 54927 invoked from network); 9 Mar 2023 00:27:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Mar 2023 00:27:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5B8C61804AC for ; Wed, 8 Mar 2023 16:27:24 -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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 8 Mar 2023 16:27:20 -0800 (PST) Received: by mail-vs1-f44.google.com with SMTP id m10so179492vso.4 for ; Wed, 08 Mar 2023 16:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678321640; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=/CDv59j9KSGW2X6Csd3up6V5QG1ViN3i1kSxTtt5RBs=; b=fswOnT41DHd9HozcBhlZ7PwuG3A1easu+1Veym9dL6em1Z1r4IzzR05Ub+x63dsALS Lxm8aM8x0py/PR+EejwPTLXkHMkoohfcJv6SaflrNHWxWXosvNFDcLUj7i5vd5gwIQnD 9BVKO+4cVG40b6+YVaNnjo9IGmRVSFOoBY6LtgYNESxLQwMrWy3EBzG34rTSjhg1Zrhl z6x3KFHgMdrJL9ajoR9w8rGScBnzH2+twwJdwgAltW4EqEwq/EwZGgYaO6ymd9t9g3/Z bqOAyhKL8CmJtXdc9qONh2t8zptkdoC3yd6vn1h+sHexYuCHUJoVmcUcVJ002i9Bs5+K 7YcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678321640; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=/CDv59j9KSGW2X6Csd3up6V5QG1ViN3i1kSxTtt5RBs=; b=wlEAObjla/RLJKw5ZcZk+N8XyB0dmUY4U6ymZvyp62HQ4zVo1v/O2pemOWXlH05LrW IYBUNDNRioGve/MWTqaEYKI1JJhVPJQjLY5qMjKBA69TTZuOP2gHJJC6iyFcDcetPZ2L aNVKgCwg5EUVmHY57GOXQWysN2mh6fXsSU+XtMkS8Pl8VHQmM/W8AmZgY5+mE4Kehgqn 1IifFE3lUiSF+/1kRz1CZGZsw3PpmRb/mYOa+q89DqNXDy7J3axiCHoiHYW10w0M5CPC 2pQH5pOJbOcCzJwCO8VXODGD6eyT6ns04dWl4ezanrTCHcqrgdBD/6Eo2VAi8xoIQ1UF M98g== X-Gm-Message-State: AO0yUKVxp/DWCQDCinnNY33U86bP3/lMmfCh88KztFYphGn6LhWtcmvr MpwZRE8n4lGeQsF9zcCdhJ0Yka1WIqiQHFy92cQHntQd1qQH6w== X-Google-Smtp-Source: AK7set8PRVOteHru3NDwqg742sz0nfGGP4K+JE7C/plnzf3u+WHeCsUbzrmeZa1HNocA9urUeIN0YcfgflShgOd5/UQ= X-Received: by 2002:a05:6102:5e8:b0:414:34d3:89a with SMTP id w8-20020a05610205e800b0041434d3089amr12888877vsf.6.1678321639722; Wed, 08 Mar 2023 16:27:19 -0800 (PST) MIME-Version: 1.0 Date: Thu, 9 Mar 2023 05:26:43 +0500 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Two Issues regarding Named Parameters; want to understand the technicality From: office.hamzaahmad@gmail.com (Hamza Ahmad) Hello Internals, I am writing to discuss an issue that I have encountered while using named parameters in two of my projects. Although named parameters have made it easier to call functions without passing extra parameters, I have found that relying solely on them can cause problems. In my first project, I have been using named parameters while calling com methods of Office VBA, as advised by Microsoft Docs. However, when I try to use named parameters in PHP, my program crashes, and I have to manually close any open applications. I would like to request a fix for this issue. If it is impossible to obtain the list of parameter names in COM, could we receive a warning instead? If the list of parameter names is obtainable, it would be great if this could be fixed in version 8.3 or earlier. In my second project, I did not receive a warning when I passed the wrong parameters. To give you an example, I have two constructors: 1. ` public function __construct(int $date, int$month, int $year) ` 2. ` public function __construct(string ...$names) ` When I initialized the latter object with the former object's signature i.e., `new LatterObject(date: 1, month: 1, year: 1970); `, I did not receive a warning of passing the wrong parameters. I would appreciate it if you could look into these issues and provide me with any suggestions for solutions. Thank you for your prompt attention to this matter. Best regards, [Hamza Ahmad]