Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111253 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33520 invoked from network); 29 Jul 2020 19:44:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jul 2020 19:44:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8905118053D for ; Wed, 29 Jul 2020 11:40:47 -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,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (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 ; Wed, 29 Jul 2020 11:40:46 -0700 (PDT) Received: by mail-ot1-f52.google.com with SMTP id c25so18235409otf.7 for ; Wed, 29 Jul 2020 11:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hyReAyvC3TLAqA81o6gpZbrmBAQ6mXD4+ipQXb/Vi08=; b=n8OKJAlkvhbuyaRxAFFI2sWkQ4VwWEqDO8asL0fzE9tS5MmrafuyyujDFgid1bOB30 I0FpECJl/RU2Ov3N0wot7i8uab4l5hMfuHbFFPMDFfQnxh3wRcAFOjrOP6k+ESxqAqUB l1WDZJ/Ycw1gwvEMcZ7nn9FGMfU9TiOndPcYO6DzaVi3FOzMal4XuvNE6KUMrs4HA5oy J2lAvXQC9Kq9d+W5KtZO6vsIuydVmpPNHAe3lrnJMfkGbVTMpesINosa8I9tqvWHWiMM xtolBTPMTaFDxNhxTraAn8tOZIX5zKT7INIunQrMuJ6xSiCWiPayqOtTJnt0xy5sYxtS I7vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hyReAyvC3TLAqA81o6gpZbrmBAQ6mXD4+ipQXb/Vi08=; b=DpU7glwk5ln0K1wPeHuMbNnmcp55q8q8xP/ZYoLExFdeHsPjcwEO1aL53ea2quzXL0 ulC3A495dorLaQmoBQARcFWw9DobFFfn2vo0vjYpxpJbxO140J7iFUGHl37cy/phkpWj seIziGFXg6YhstHxJEeiv6idS1kcSKjaSVWyu+ZFne+aPSGl+pO0z+v0wjQxHThjfwGy 2Uy/L2XDad6SrfY0Vkai8bHs+KSGqKoA/pW0k7iRqt1BTSoCc0IKE1c/V/b/qc2VVd9g DOSHHJallixz3ipZYBQlFak6AzbI063TkSXxDEK6Lg0YdOloJOtsp5ulijUGDzwegS2t XS2A== X-Gm-Message-State: AOAM5316GTwBjFwnp7Pc7T7JmqhZTuG9h3jaum65gl6rBUgeOuBn5tIF 21Id6dAq5amKmfuxna01hZDD8brjxOXh1z+NGPmzOrJyXlI= X-Google-Smtp-Source: ABdhPJw0MjemQyeY8LEo4C3FOKVWdASsVr8vvt/0YzfW7vrNLxT2X4gGdcn41fszQPYZxw9bndTiXvFoU4GlYIbrXJY= X-Received: by 2002:a9d:4006:: with SMTP id m6mr18317365ote.182.1596048042582; Wed, 29 Jul 2020 11:40:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 29 Jul 2020 20:40:31 +0200 Message-ID: To: Joe Ferguson Cc: PHP Developers Mailing List Content-Type: multipart/alternative; boundary="0000000000009f699905ab98e416" Subject: Re: [PHP-DEV] [RFC] [Discussion] Shorter Attribute Syntax Change From: michal.brzuchalski@gmail.com (=?UTF-8?Q?Micha=C5=82_Marcin_Brzuchalski?=) --0000000000009f699905ab98e416 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Joe, wt., 28 lip 2020 o 16:47 Joe Ferguson napisa=C5=82(a): > Hello Internals, > > I've been working with Derick Rethans and others (thanks all!) on a Short= er > Attribute Syntax Change RFC which outlines reasons why the "#[]" syntax > would be preferred over the currently agreed upon "@@" syntax for Shorter > Attribute Syntax. > > An important part of the research that went into this proposal demonstrat= es > how "@@" will make handling attributes more difficult for PHP_CodeSniffer > (and similar tools) and shows how the alternative "#[]" syntax is more > friendly for these tools. > > You can find the RFC > https://wiki.php.net/rfc/shorter_attribute_syntax_change and I'm happy to > answer any questions as best I can. > Thank you for bringing this up. TIL something new about popular framework templating component which I wanna share with you. There is already use of @@ in files with ".php" extension in Blade templates from Laravel framework. In Laravel 7.x double @@ is used as an escape sequence allowing template compiler to passthrough TypeScript expressions with @decorator() which is described in the Templating section of manual[1]. I realize that it's not the same cause the double @@ is used here inside ".php" files in HTML mode and not in PHP code mode but since this feature exist it may cause issues on a text search lookup using for eg. grep | sed | awk like tools. TL;DR Now please bear in mind that I'm just saying that people from Larevil community already can use the same syntax with double "@@name()" in ".php" files but outside of PHP code context. [1] https://laravel.com/docs/7.x/blade#blade-and-javascript-frameworks Cheers, Micha=C5=82 Marcin Brzuchalski --0000000000009f699905ab98e416--