Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109456 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11288 invoked from network); 30 Mar 2020 17:29:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Mar 2020 17:29:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 45E481804B8 for ; Mon, 30 Mar 2020 08:55:10 -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,SPF_HELO_NONE,SPF_PASS 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-f47.google.com (mail-vs1-f47.google.com [209.85.217.47]) (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, 30 Mar 2020 08:55:09 -0700 (PDT) Received: by mail-vs1-f47.google.com with SMTP id w14so2085483vsf.7 for ; Mon, 30 Mar 2020 08:55:09 -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=4cXYDiwALsVlG4M5480xZ7q9x6wHW1peCxqtyRps198=; b=ln+TFAJA4qQjNEKntQ8H5kiIzHxsVatTX4BIB1FTvR9LxsTTFP6t8hUQPv6nU9xnB7 gfBYo3lQ42bt8XRvYkUfv6cVKkwvTbWp0ZoUhC0IbYCBv8D+iG5b1xB8f/99KlCF9+D4 6rtL/Cksol50WuTRoPqHJjmx8WUK9fUrZG5hbVb+Y72B6ADfgpU843tXsIXI6Z+XVejb VOLPsHboauhjvO86pZxAXNN/REt1LMuHWG+xuZ1ulbTrIdwiwVhIshtkg5dAEY+It0JB b3+uKGlZhwjO8dl5dmg7KmbAmYoIOJBNSxe6+vb0ZyKG703DCuN1lu1sCFwzUeNRBsSX sh9A== 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=4cXYDiwALsVlG4M5480xZ7q9x6wHW1peCxqtyRps198=; b=AAOVFXAaoYon3nKv0gH+hLvJ8g8R/WV3ginLxdo4kXSsPJLB/XjjotrgNb1ugrozJq u4810QEJJNlfIvw3MJDuLfFg/1DriRYeqbGgWAVGL9oi1Flg+oYntBmuTV/tkishUwIx UCkxSXkHvwc3JnxtkCCPhuvYa9Z1GHGmz9843Gt11jiWEGKZVsdYlXmSRg0Uu2z3xI2F xAkaJN5cZekFN8Uefovk5fZUZDc13cJ246a514Fcy1JOJRhywx3EjmKKpZkzwUOzUM2g DTALZ2N0WkG2ob3RIiPxmawX5p+DWM7vkmG/Je8FwbcpdzBFHtD1U1pSeH0mfnPW0K4L nMPQ== X-Gm-Message-State: AGi0Puab955ymQCp/6giO8sMx8JC6qzQQOIII4o2qvg57/ZnmPVGB6mj J2pKJa3pdymqY4Pc0YFo2vSguVjHeTPUyFTDWk773qvM9xs= X-Google-Smtp-Source: APiQypJMC5nqkErNf0pemXbvUphU7OLYXKERmuwfvez1FsfwMe0GeZc0jPeK3JhCnp4v+jUMlx6BsnJ+B+qaBPuOcGA= X-Received: by 2002:a67:2c8b:: with SMTP id s133mr9011275vss.6.1585583705986; Mon, 30 Mar 2020 08:55:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 30 Mar 2020 11:54:55 -0400 Message-ID: To: Dan Ackroyd Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000008e9c0b05a21479bb" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax to use short hand arrays From: theanomaly.is@gmail.com (Sherif Ramadan) --0000000000008e9c0b05a21479bb Content-Type: text/plain; charset="UTF-8" @Dan Ackroyd > That's an aesthetic choice, which not everyone will agree with. > Yes, I freely state that in the RFC. Everyone is free to vote how they like. > > "There shouldn't be any backwards incompatible changes" > > It apparently breaks 25 tests that compare the output of var_export > with an expected version. Userland users who have similar tests will > experience similar breaks. > > A test that compares var_export output is a pretty broken test, in my opinion. This is similar to a test that would use the value of a constant to test that the constant works. You're testing PHP code you shouldn't care if it uses the long form array construct or short form. Just test that it gives you an array. With that said, I will update the RFC to make note of these tests and I will fix them should the RFC be voted in. > Is there any reason to do this change other than aesthetic choice? > > Just because it is aesthetic is not actually an argument against. Why wouldn't you want to improve the aesthetics of PHP? Is it only an aesthetic choice, however? Not entirely. I also state that it is easier to read and type (saves space) and is more inline with JSON notation which is a lot more ubiquitous these days. These are all pros. I see no cons in that change. --0000000000008e9c0b05a21479bb--