Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108412 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 12514 invoked from network); 6 Feb 2020 13:53:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Feb 2020 13:53:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ADC7F1804F6 for ; Thu, 6 Feb 2020 04:06:13 -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,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-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (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 ; Thu, 6 Feb 2020 04:06:13 -0800 (PST) Received: by mail-lj1-f172.google.com with SMTP id f25so5799603ljg.12 for ; Thu, 06 Feb 2020 04:06:13 -0800 (PST) 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=Efunqg3/Gjx4RNnAoeEDB0hV+i94UIaKXUjfUVLjexU=; b=R+AMVDddgptT3FH2GyZB02p/JLyrE8rChluvBxreMYVYkCRB019EIzG3KVNqrgUYZX RyXS39lyE96ieOhAO4WoB62Xp7iOqRsjbUgUpHh9/rFFxSWgeuUb61aop7Z20wm/5URL R1vN7hmY7AJIBS/Pysw8cuwjE575/YBPWxupcmNq46znrdc0PeGnnb5yxNDzooBo9akJ ch8NaECJj/Tv6fb2RG//GSbb7kGIACh2+GIOZxpFxPzMjk8OVHFx/07Io1QqnlQtTTBH zrLb+Lwa2cKUTFXMZzqVQNx/5BYpr49uXfImMXa8y86X34Q6HFK6AMmjoUOJw4z7CJMJ NHGw== 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=Efunqg3/Gjx4RNnAoeEDB0hV+i94UIaKXUjfUVLjexU=; b=PL0R5Zd6qyMqIRaQ5WPpEu0FU5x9oMkpSulZCIsp/PFj49cqyH/Coo21FJmMgyB6PS sKPi+KsoTB6pAuTspmCYsZri3RmNWBlMeYC9a0lfsnj/nolmHDuyYutdYM28UxBXPRCG 1B7+47IDCNBLG2pAyDz+w/ywxgUxAIrck7yd/+S1isl0J0oFNR5xteBeZq6mlK+czcjn lg/pQI8SpmVK/DAop2GeiyQn/Eno8l86nARSu1L430ZFPEEGpHpGwBigMZA4+KYU/fU3 W20vXFnOCN23Nanr2Q2VI5q05EfGOG/LJ67kufhbhNhJU3RJd+1C0DV5shsqM7/jx+17 BIIw== X-Gm-Message-State: APjAAAVyFt4HB5qSl4KAggOAmALmQM5LlH2ZPIhMxF2l4yRCwHdn+JyE NVx1sX48sAe/V5sDV2FEg21gqU7F/BLAFFOsLRM= X-Google-Smtp-Source: APXvYqwWd/yAFoU0Wgz6LszN43EV/I6HUy57KYdJr+1/yTXH8O0IrAetf8xEqv7DMU8DvjYWuKMVudOwdrQguL7mjzU= X-Received: by 2002:a2e:9744:: with SMTP id f4mr1913760ljj.267.1580990767944; Thu, 06 Feb 2020 04:06:07 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 6 Feb 2020 13:05:51 +0100 Message-ID: To: Steven Wade Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000001dd5fc059de71938" Subject: Re: [PHP-DEV] [RFC - discussion] __toArray() From: nikita.ppv@gmail.com (Nikita Popov) --0000000000001dd5fc059de71938 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Feb 4, 2020 at 2:03 PM Steven Wade wrote: > Hi all, > > I=E2=80=99d like to officially open my __toArray() RFC < > https://wiki.php.net/rfc/to-array> up to discussion. I=E2=80=99ve delayed > changing the status until I had more time to respond to the discussion, b= ut > since it=E2=80=99s been brought up again , I > figured now is the best time. > > https://wiki.php.net/rfc/to-array One of the things that stand out to me in this RFC is that once you set strict_types=3D1 (which surely we all do :P), not a lot is left of it. Whil= e there are quite a few places where objects can be implicitly converted to strings (say echo, concatenation, etc), there are not a lot of places where objects can be implicitly converted to array. A quick grep has around 500 string conversions in the codebase, and 20 array conversions. Nikita --0000000000001dd5fc059de71938--