Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118692 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 40525 invoked from network); 26 Sep 2022 12:36:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Sep 2022 12:36:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0BF3918053F for ; Mon, 26 Sep 2022 05:36:52 -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,HTML_MESSAGE,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: AS2639 31.186.226.0/24 X-Spam-Virus: No X-Envelope-From: Received: from sender11-op-o11.zoho.eu (sender11-op-o11.zoho.eu [31.186.226.225]) (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, 26 Sep 2022 05:36:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664195808; cv=none; d=zohomail.eu; s=zohoarc; b=JFcRyxtdOIzWnCAloWHEp/gu3pg790s+OKbFIAAv1CucaQKqvL1ZRD8cA2W2FminmyzLPXsG0j8+uyoiGqHRe0kETfulN8P1cRyuV0MJjkNCHg+ZSDXosPYCuUSoX3OUIXDTFF4fHcrWgsTY3PLQekP71akhvAyKue+wAtVzXnU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1664195808; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=ap/k1bGrfE1ehMJ8NBLtY3cm9lVCJ9GkHUREOszeE9Q=; b=DMLAAzXxH7dlD6rBwRgoFJ2j+pYxUOu3lYGzmAUUTMGIrmVs3uCCCcEC0W7y1KRHIA/JEU+Je3TwoHIim+kMd61AYWYX37670zeonrYVqLmuaMvAafsgSam+iKZwfIh1pDMH6KDuz/Ye7ZfZwreABqW01JU9mPG9egtVPaM/jnk= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=limesurvey.org; spf=pass smtp.mailfrom=olle.haerstedt@limesurvey.org; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1664195808; s=zoho; d=limesurvey.org; i=olle.haerstedt@limesurvey.org; h=Date:Date:From:From:To:To:Message-Id:Message-Id:In-Reply-To:Subject:Subject:MIME-Version:Content-Type:Reply-To:Cc; bh=ap/k1bGrfE1ehMJ8NBLtY3cm9lVCJ9GkHUREOszeE9Q=; b=NDFzepPSMK+pRL+LKv2tjaGutJDhLCMAIzI/luxrQeyTDtO9LPA5RXRucGQw9A3b SFGVnyqWROtSo0GPst0MzV3u/mPxVjlVzVlAeLEnK4sx+CNDHHDoJClg/cGxWgirsd9 Dr7i07pxy9h3WYltP1UTG/DxF63aVuAuw6yeVjWc= Received: from mail.zoho.eu by mx.zoho.eu with SMTP id 1664195806605176.6467213077931; Mon, 26 Sep 2022 14:36:46 +0200 (CEST) Date: Mon, 26 Sep 2022 14:36:46 +0200 To: "Internals" Message-ID: <18379ccc576.c7a70730520510.8248913710726294600@limesurvey.org> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1502431_928520401.1664195806583" Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Subject: Allowing type alias for built-in types From: olle.haerstedt@limesurvey.org (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) ------=_Part_1502431_928520401.1664195806583 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Has this been discussed before? Some use-cases: use array as tuple;=C2=A0 // Could interact with Psalm/Phpstan to give more= intentionality use array as strings; // Same, together with "@param string[]" docblock use int as meter;=C2=A0 // To communicate intent etc Hard-coded support in the parser could perhaps be added here? https://githu= b.com/php/php-src/blob/master/Zend/zend_language_parser.y#L469 Olle H=C3=A4rstedt Software Developer (Chief Software Architect) tel:+49 40 22660066 mailto:olle.hearstedt@limesurvey.org https://www.limesurvey.org LimeSurvey GmbH Papenreye 63 22453 Hamburg Sitz der Gesellschaft / trade register: Hamburg, Amtsgericht Hamburg HRB 13= 7625 Steuernummer / tax id: 49 / 740 / 01441 https://www.limesurvey.org https://www.facebook.com/LimeSurvey/ https://twitter.com/LimeSurvey https://www.linkedin.com/company/limesurvey https://www.xing.com/companies/limesurveygmbh https://github.com/LimeSurvey/LimeSurvey ------=_Part_1502431_928520401.1664195806583--