Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112931 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 5765 invoked from network); 19 Jan 2021 17:31:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 19 Jan 2021 17:31:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 950791804DD for ; Tue, 19 Jan 2021 09:11:05 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (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 ; Tue, 19 Jan 2021 09:11:04 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id A86BE5101324; Tue, 19 Jan 2021 17:11:02 +0000 (UTC) To: tyson andre , Nikita Popov Cc: "internals@lists.php.net" References: Message-ID: <31439845-e0eb-e369-0ac1-052d5bccea57@processus.org> Date: Tue, 19 Jan 2021 18:11:01 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0) From: pierre-php@processus.org ("Pierre R.") Le 19/01/2021 à 16:12, tyson andre a écrit : > It seems inconsistent and prone to bugs when refactoring (e.g. converting to string and not using the result) > to have two functions named var_export where one prints by default and the other doesn't, but otherwise . > Changing to a different name entirely would solve that, such as var_repr(), var_representation(), serialize_[value_]as_php_snippet(), etc. Hello, I think that decoupling it from var_export() and naming it differently is fine. var_repr() is not a bad name, a bit cryptic, but for those who do Python, it's familiar. Regards, -- Pierre