Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109989 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63275 invoked from network); 4 May 2020 16:14:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 May 2020 16:14:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E469818054D for ; Mon, 4 May 2020 07:49:20 -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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 ; Mon, 4 May 2020 07:49:20 -0700 (PDT) Received: by mail-qk1-f170.google.com with SMTP id b188so16807817qkd.9 for ; Mon, 04 May 2020 07:49:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=7NWHBYolyalka4v5yqNQAGlYbE7c/ucDeeVwRfQhzVE=; b=IVETUV3KvONfIb4O+NUaxVihFgAtd5KBcwSYlQg7n1/5QwzNSE2J5YZck33E/pRddZ v8N8b3Py1K7P4gJYpLlaOEDViJ1kJ3RTB9m4OwKpxlvDmPIkJ90rlCqnTz9khMOXoR74 OI2WOsCvFgqblZnJgK1SdrNlSbJbSjO+mv3Vj3G+XGwdRxnwyWE7kEtoDE/sozwp4Jqb CHA5NzqQCci0UKF0Amz+13NArARQVVX+4S2ozZ5DBwYML61VrtmWrlQxzzXgNJ25NEr1 I1XOiErriPDM4caIO09e2jKaBb64twZergU50XSzANORiZ+qH6uwuxwDHiiZzfnvf3Xo GRSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=7NWHBYolyalka4v5yqNQAGlYbE7c/ucDeeVwRfQhzVE=; b=eKxHWJ/29IH+MwutnUT3GulN82IQNUe0tgk6bFBLxZE3JYSPaq7/7gcUKEmpzR8umA cwg91WIr7gRca0Wmj40e03JGG5Sc0tAt8Z8vMvZmOprLOtr9CHC0vVIaKph4q2tz5Fjr cF8iYSAuD6h4EIK7F0Qq4WImzVZs+byzapbLbrWhIwO+AdcxNwRjw6D49fAOxj47pIxo nvxzXxC9OPvfwtmwe0a+bHHQvvUZmd+UnieFsEMkUCfUlkdPEn3uK1tLkeguA8Z8BKHl afHrNu7w5PmwSaMvAcV90m1G34g2ZXU/0uVDvQKSpA2EmaATazxkWHj7VWTYyiWoh31h h2hQ== X-Gm-Message-State: AGi0PuZiKfLypFxFpeTSqUooGFPtxdYc2LMkYi3Pldk6y6ezKxDJteY1 asNou8aSL7OKrIVFYVPeqgBXOg== X-Google-Smtp-Source: APiQypI4FYY7QGtMPBZ1JIV2F1ewIBTvaLrHN9C+/37/u0neTic6nnFUyhHCjMe+DOXkKr8jGnuWNg== X-Received: by 2002:a37:9a41:: with SMTP id c62mr16960760qke.244.1588603757281; Mon, 04 May 2020 07:49:17 -0700 (PDT) Received: from [10.10.42.56] (h96-61-170-50.lvrgtn.dsl.dynamic.tds.net. [96.61.170.50]) by smtp.gmail.com with ESMTPSA id x19sm1132804qkb.136.2020.05.04.07.49.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 May 2020 07:49:15 -0700 (PDT) Message-ID: <77E8E001-6814-463B-9F8B-8A8A2F1BF74E@benramsey.com> Content-Type: multipart/signed; boundary="Apple-Mail=_A6275D6A-6FC2-49BB-81CA-CD5C97BBFA00"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Date: Mon, 4 May 2020 09:49:14 -0500 In-Reply-To: Cc: Manuel Canga , Internals To: Matthew Brown References: <171dee3baf3.bef5753260554.3262181919550021853@manuelcanga.dev> X-Mailer: Apple Mail (2.3608.80.23.2.2) Subject: Re: [PHP-DEV] [RFC] Keep type of reference params From: ben@benramsey.com (Ben Ramsey) --Apple-Mail=_A6275D6A-6FC2-49BB-81CA-CD5C97BBFA00 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On May 4, 2020, at 08:01, Matthew Brown = wrote: >=20 > This would break quite a lot of existing code, though PHP could add an > explicit keyword like "inout" that catches this behaviour (see example = in > Hack: https://docs.hhvm.com/hack/functions/inout-parameters). >=20 > Today these issues can also be caught with static analysis: > https://psalm.dev/r/1f670956ab I think I=E2=80=99d be supportive of adding `inout` parameters in = addition to existing support for references. Cheers, Ben --Apple-Mail=_A6275D6A-6FC2-49BB-81CA-CD5C97BBFA00 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQToXQMR3fpbrPOmEOewLZeYnIwHGwUCXrAragAKCRCwLZeYnIwH G8w2AP9+fCAjZBwvq+JTh33UIm8zHuoUhQLIJkR+TES/OjOALAD7BRoiUDAs3KVM ooaLx8OQSps/sx2ClP1BYmRiqY2yc4o= =hSeq -----END PGP SIGNATURE----- --Apple-Mail=_A6275D6A-6FC2-49BB-81CA-CD5C97BBFA00--