Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112942 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 1437 invoked from network); 20 Jan 2021 16:50:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jan 2021 16:50:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 35EB31804A7 for ; Wed, 20 Jan 2021 08:30:53 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f43.google.com (mail-io1-f43.google.com [209.85.166.43]) (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 08:30:52 -0800 (PST) Received: by mail-io1-f43.google.com with SMTP id e22so47990671iom.5 for ; Wed, 20 Jan 2021 08:30:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benramsey.com; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=9dl7zlYnnUO8FDbPfRDoRZTrT67kTS8XeQeypEaVqKQ=; b=G4Ae2q4kPQB9zm0vkTBa48/0xTcFR9gyho8ll5ZGJjTyi78u/1xIRxN8SsrE9mPElg o18IoaXttnuDUyaqadtiXW3Kq/xaUBkmus7EwSVSz7lCRIPlS9stLMbAl6oN1tAAbTCD RK04Ol9LF1u8LpVooaiGkxaZQMAABEyXEOVZVkoSIJ+v2aopnakWjscaM+dTG9Nc7TK5 W27shRREolUD56TDiwvC2Yn3o85v/461Fi5CPZyTdS2iPImrrlVDq/7w3taFXPyrtwVm LHk2rlETDIwnU7bSRdaLeZ/hDEuHkaMKQh9LkldR9WhefkZafW03rgFFAnIv9MP+God5 sDsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=9dl7zlYnnUO8FDbPfRDoRZTrT67kTS8XeQeypEaVqKQ=; b=cSjeJvBTthK+jHfLn3GirV53XrBmi3FfIE6nSqJ2Jt8pCeJ6KwoA9/vneVu0eK86d0 ftsEq80F46neo2kFv2oJb8LHRpEuEHbil7rHNZas5FnfP0KlEFrBXiLedRU0uTS7z6c+ QeWdEiZOrQdx9yzFIbmJiIPqRcDVuLKXc1uMTa4IdxQpT/ueb/er8PB5Yutg690NicQi tDTEHB1f/TFgwcmVPmUXu22RuR95byigDAdIlqjigmve7vffI5TUzfxCZaakF5azljCy yQQYoYsA3E5mo2koKHXZIlCK+FtVBU9++CKwmgmGuDRlKPmKG64KLDQ2Z/vemlj+JLMP CzWQ== X-Gm-Message-State: AOAM532B21p8nq1qlU4YUKUIrhgOJCpQ9IWglOiOYRHpsDYnVLTbi9Vc sXJ/2/2qw5kUYl8xh4ohDYIoUQ== X-Google-Smtp-Source: ABdhPJxcOvKDIqR5Y8G2AOBVP8BVU/UiGSzxc0CMSfCNzUbGzWRrAdIIivy3qRaZp6IoiqBMNdOLqQ== X-Received: by 2002:a92:aac5:: with SMTP id p66mr8604210ill.238.1611160252353; Wed, 20 Jan 2021 08:30:52 -0800 (PST) Received: from [10.10.42.56] ([96.61.105.82]) by smtp.gmail.com with ESMTPSA id g6sm1286536ilf.3.2021.01.20.08.30.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jan 2021 08:30:51 -0800 (PST) Message-ID: Content-Type: multipart/signed; boundary="Apple-Mail=_07898D87-2B50-4805-8EC4-59584D73CBE5"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Date: Wed, 20 Jan 2021 10:30:50 -0600 In-Reply-To: Cc: "internals@lists.php.net" , Dik Takken To: Marco Pivetta References: <4C7634A2-885B-437B-B765-C82C2B93143B@benramsey.com> X-Mailer: Apple Mail (2.3654.40.0.2.32) Subject: Re: [PHP-DEV] __repr() magic method (was Re: Proposal: short_var_export($value, bool $return=false, int $flags=0)) From: ben@benramsey.com (Ben Ramsey) --Apple-Mail=_07898D87-2B50-4805-8EC4-59584D73CBE5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 20, 2021, at 10:28, Marco Pivetta wrote: >=20 > On Wed, Jan 20, 2021 at 5:27 PM Ben Ramsey wrote: >> Taking this to a new thread so I don=E2=80=99t derail the = `short_var_export()` thread. >>=20 >> Dik, I like this addition, but I think the name =E2=80=9Crepr=E2=80=9D = might be confusing to PHP developers who aren=E2=80=99t familiar with = Python idioms. PHP function names and coding standards within the = community tend to lean more toward verbosity than terseness, when it = comes to naming things. >>=20 >> Perhaps we should follow the lead of `__toString()` and use = `__toRepresentation()`? Maybe also introduce a `Representable` = interface, like `Stringable`? https://wiki.php.net/rfc/stringable >=20 > Ooof, can we just avoid more magic methods overall? :| I think that ship has sailed, friend. ;-) Cheers, Ben --Apple-Mail=_07898D87-2B50-4805-8EC4-59584D73CBE5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iHUEAREIAB0WIQToXQMR3fpbrPOmEOewLZeYnIwHGwUCYAhaugAKCRCwLZeYnIwH Gzt8AP4vqj6dvPqmVEDu2b3TrWZi52mhIfjmwTQ1CwxkaorM3gD9HkENYJj6QzXV sDdDg2x+H3vU6mObmi0AzJZgiO9ZvtY= =v5fA -----END PGP SIGNATURE----- --Apple-Mail=_07898D87-2B50-4805-8EC4-59584D73CBE5--