Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:98564 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20701 invoked from network); 16 Mar 2017 06:28:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Mar 2017 06:28:04 -0000 Authentication-Results: pb1.pair.com header.from=bburnichon@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bburnichon@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: bburnichon@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wm0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:35604] helo=mail-wm0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 60/29-38004-3703AC85 for ; Thu, 16 Mar 2017 01:28:03 -0500 Received: by mail-wm0-f46.google.com with SMTP id u132so26832706wmg.0 for ; Wed, 15 Mar 2017 23:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Vlu/d9Z0P719hUMmoTHzwQ2dgQPL+57aSIjOVqb3tB4=; b=dcQUAliQPzyrPGRGjTV9c2mhVCa5aLIh17LiJDTKOw19UwnZ5Mxwqxttaqfz9glFgD T1qhXOr31kH//XWGsLzWqUvLpy8jRf1BsiRegWo/Vx8ZJhMUtC+x47JS1H6n34LIsfYs PsqofY2SePNp82UlmzPzzZmL50YgxfKtlgNJwvaew/6y/84QooJkoo9mZvo0dN6gLBZM UxJqr/qdLIG6FGx8jKVUwePerqK0x5nabs2ujplL9gTnxTCqvOVb4ZyJAuQHnKdJ64k9 5J8qNASDIqCABR9/iD3EtcPlhelWTRFjU2N1KHCOUrWbidvyR2SQ0N4WmePEt2ytmYdy UU8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Vlu/d9Z0P719hUMmoTHzwQ2dgQPL+57aSIjOVqb3tB4=; b=Cdc/5TkCM/rS/Tz5uSzL22GNkjaFer0xh/BaCPYnV84GSPvm5tIj1hDsixAHTm369S Fgv0DWbMCuEskmi63fJk+zCZntF4VjmHtUFVy4MkXc82bf+kWjHfUitsiKrgCv6dScLg bEMPLiCKoRh1bZXGb30vNAaO32jOVqg+KX9mFhVQrRJNhdfnjbZKb+hzpGTWUXBkKWwr AeqfcZiu15RXYL7B8TshSMVOvdiwQVSmBWOWB89LzxVcIND8Y6rQblIIFYa6BffjdLJc /jufFODEt2dfvgo6yE8jMlp+ipB0261fGFa1w0tRRKm/aIvIShF2AVYykwaXfOQs2SlS Vc8w== X-Gm-Message-State: AFeK/H1nxa1oyh/OlYGMpCz9G+Q7CMzyVqNKA/2i+1PpCPrWpnP2KZKG0ksiXbIk4H50zswZRBvTZIaX0RY2gg== X-Received: by 10.28.6.203 with SMTP id 194mr23916800wmg.125.1489645680523; Wed, 15 Mar 2017 23:28:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.71.150 with HTTP; Wed, 15 Mar 2017 23:27:59 -0700 (PDT) Received: by 10.28.71.150 with HTTP; Wed, 15 Mar 2017 23:27:59 -0700 (PDT) In-Reply-To: References: Date: Thu, 16 Mar 2017 07:27:59 +0100 Message-ID: To: Marco Pivetta Cc: Andrey Andreev , Ryan Pallas , internals@lists.php.net, Kalle Sommer Nielsen Content-Type: multipart/alternative; boundary=001a11443f0ca0fd5f054ad32949 Subject: Re: [PHP-DEV] Add __toArray() method to objects that would be called on cast to array From: bburnichon@gmail.com (=?UTF-8?Q?Beno=C3=AEt_Burnichon?=) --001a11443f0ca0fd5f054ad32949 Content-Type: text/plain; charset=UTF-8 FWIW I do prefer having a specific interface to do such conversions. I was just trying to find a way to have list-like or Traversable objects ability to be converted to plain array. This brings more problems than actually solving. I will just stop thinking about this and can give this thread as reference of why this feature would be a bad idea. --001a11443f0ca0fd5f054ad32949--