Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109462 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30143 invoked from network); 30 Mar 2020 19:06:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Mar 2020 19:06:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0D57418050B for ; Mon, 30 Mar 2020 10:32:22 -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_H2,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-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 (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 30 Mar 2020 10:32:21 -0700 (PDT) Received: by mail-vs1-f44.google.com with SMTP id u11so11622944vsg.2 for ; Mon, 30 Mar 2020 10:32:21 -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=U+R/77/1uR5SP6VnnzTFj0CG4/+L9YO9nBmr9jcnihs=; b=qsEEiHWD0Y88UQ1vnmKsWHVvz6meLr8XAuwxhgOAQkYLfRET6XIu8g0aM8IgQ9ovsA d6ssxNeZN/DvPbJ5xgbv/+DZg1Grkg7XlVIxo+LohDGQi6UaEpxHeGpqRDBAnljd9K1v z7Xkv8Pyx08Mny6MfIYJuVvNu/z7m6/KsymWcAcm7jUhBwAZrjgIwamgwWJKKbCd113P HExPftTSAj7IeyLd6NPsOzw7LmCIV6uZDjfk8aUdSwyuUxWR1wcEtNChv3OQRqTD97iz +ioX3dodih1E/fzp/KlQa65hgDsXfOFMtTT2lcv1T6jTTyPhS9ifhUtT7ARTWlH4OMl9 y8uw== 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=U+R/77/1uR5SP6VnnzTFj0CG4/+L9YO9nBmr9jcnihs=; b=rUoC4XshgboqNA/igKqSGvYE2FRNzbSJ5IRLEgljNETmveneoHyp+Xz6sWwyz1WxGS Twarqhmz2/frruGB7eiT6bObGMJ5U7iPgej94sadFInhVwggpnpa9GeWnJf2U1vB/Uuc ux1uqZieio5wRIRvjSK6PtBTsvVIOqTLuRHXAoIJPiWV+qZO6dcjIZk3vlEZ8gq5/4I9 HPkxgtgbQKWcP+0oOrx7ICwh2i4NYO2ap1Ydr7G09rd5ISV6M/VrvQmkR82430+Ob+7d WA2apLod6VKJuFTv+7mKP/2FozNsokjOSQ5CTclhfOOKBTG7OeMBXkL8zU8wtaX4G5a9 oW1w== X-Gm-Message-State: AGi0PuatGMoYCwi3hqsQrR1+mXfdomx9bifIDFlIXxN+S2M6wOkN2zOA G1VlMxwrFU8uaG4azSH/hkuw5YRdQ1tIJkz7S6o= X-Google-Smtp-Source: APiQypLbXzENlS+BUNkQaCcGI5is4bz01eeZDuER4GDtxxATuOmy11wCjPK4mQaKlGdZf6PLqQaEIEeMQDLdHg+3Wmo= X-Received: by 2002:a67:1942:: with SMTP id 63mr5648736vsz.37.1585589540244; Mon, 30 Mar 2020 10:32:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 30 Mar 2020 13:32:09 -0400 Message-ID: To: Sara Golemon Cc: Benjamin Morel , PHP Internals Content-Type: multipart/alternative; boundary="0000000000004e533205a215d5c0" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Change var_export() array syntax to use short hand arrays From: theanomaly.is@gmail.com (Sherif Ramadan) --0000000000004e533205a215d5c0 Content-Type: text/plain; charset="UTF-8" On Mon, Mar 30, 2020 at 1:19 PM Sara Golemon wrote: > On Mon, Mar 30, 2020 at 10:56 AM Sherif Ramadan > wrote: > >> @Sara Golemon >> >> >>> Ditto Danack's question, adding: "Then why not use brick/varexporter?" >>> >>> -Sara >>> >> >> I punt the question back to you and ask why not use PHP? >> >> Simple. Because an implementation in script code is more agile, more > accessible, and more maintainable in the long term. It's better in every > way except default availability. Considering the *1 line* required to make > it available in a project, this is not a compelling reason. Conversely, > avoiding unnecessary breakage of existing code over a matter of aesthetics > IS a compelling reason. > > Now, will you answer my question? > Simple. Because an implement in php-src is more available, does not appear to have a lot of maintenance overhead, is easy to implement and it's better in every way. Considering the 6 lines of code required to make this change available to everyone. Given that code is meant for human consumption and given that aesthetics play a big role in code readability I would say that conversely doing it IS a compelling reason. Apart from the 25 phpt tests that (in my opinion) are testing the wrong thing in the first place, what major projects do you know of that would break as a result of this change? And I'm not talking about more tests that test the output of var_export() because that's a breakage I can live with. If you were using the function as intended you would only be testing that it gives you back valid PHP code and not trying to test its literal output. > -Sara > --0000000000004e533205a215d5c0--