Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112948 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 35021 invoked from network); 20 Jan 2021 23:39:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jan 2021 23:39:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 86AB91804C6 for ; Wed, 20 Jan 2021 15:19:34 -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=2.8 required=5.0 tests=BAYES_05, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) (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, 20 Jan 2021 15:19:33 -0800 (PST) Received: by mail-lf1-f50.google.com with SMTP id v67so36499806lfa.0 for ; Wed, 20 Jan 2021 15:19:33 -0800 (PST) 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=YFqAxnFZwbsdHXT8Bwy3qzVhNLO5pgLksM/3DmWBkks=; b=SP6oVJ1R0yL8kHLMReEo3rdJH4DCPo4Vxj4Z6A+Jn2OUZUCebeWbUyAQ0z4f2Mak/j zfzTGuOwMKSga+yPD185zNLaLDFpbMq4e/2vPrZJZAdnrslgWk99T6c7qKqpimR+aPzJ +Nn7lbvcQl32yob2c04SNQkOCYozKWLZmz74zKesXEEVEyyoJH1GFA+gcOynxMrC57OR RF1hAheRmlGXBu1EZVSrOaJdS9LU2pKQfk8D6NDzb+dLhNZ/ST+C461yroRdhkocbs8s mUIl+0UU1MTIgPkIY4bEhJfbCdin+GooihSv9x0XJIU3w35owIClzUOnGPoT7C7DM02g 7YxA== X-Gm-Message-State: AOAM533LLeprVPfYcIYeBUupeFrFykb2k2bfKFreJE1ZmxhKQrQUK5Gs qooWm60+TezrXBmj+sbDGWKURJ4iIBATeP7Iqj9sfA== X-Google-Smtp-Source: ABdhPJxxXcW5vlHe3pXW1hOfzN9QAwTAlgyMC8uxuRxflW7Ha4wSOeepdiyJeXTBciKeDYlGlyBL+7s1YQ6u3r7dFQE= X-Received: by 2002:ac2:544d:: with SMTP id d13mr4937180lfn.397.1611184772208; Wed, 20 Jan 2021 15:19:32 -0800 (PST) MIME-Version: 1.0 References: <22e7ebcf-3f98-ff74-8d84-d2b50cda44b7@gmail.com> <1DF0F205-30A4-4FA3-8A58-703BAC6AD732@gmail.com> <18afe2ed-0802-8f76-b094-64d5ff8cf37f@gmail.com> In-Reply-To: <18afe2ed-0802-8f76-b094-64d5ff8cf37f@gmail.com> Date: Wed, 20 Jan 2021 17:19:21 -0600 Message-ID: To: Rowan Tommins Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000003eaff05b95d305f" Subject: Re: [PHP-DEV] Proposal: short_var_export($value, bool $return=false, int $flags=0) From: pollita@php.net (Sara Golemon) --00000000000003eaff05b95d305f Content-Type: text/plain; charset="UTF-8" On Wed, Jan 20, 2021 at 3:44 PM Rowan Tommins wrote: > On 20/01/2021 20:21, Claude Pache wrote: > > Or `short_var_export()` could just reuse the existing `__debugInfo()` > > magic method (which is already used by both `var_dump()` and > > `print_r`, but not by `var_export()`). The programmer would just need > > to make sure that `__set_state()` can consume the array produced by > > `__debugInfo()`. > > > This is an interesting question to explore, but I don't follow how this > relates to my previous e-mail. I'm saying that having print_r, var_dump, > var_export, and var_export_short (or whatever we call it) all in one > language is more confusing than helpful. > > IMO print_r/var_dump should be kept out of this discussion. Those are human readable outputs for human consumption. var_export() is about a machine readable output for recreating initial state within a runtime. The requirements presented are wholly different. -Sara --00000000000003eaff05b95d305f--