Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97253 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77856 invoked from network); 2 Dec 2016 14:20:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2016 14:20:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=david.proweb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=david.proweb@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.48 as permitted sender) X-PHP-List-Original-Sender: david.proweb@gmail.com X-Host-Fingerprint: 209.85.213.48 mail-vk0-f48.google.com Received: from [209.85.213.48] ([209.85.213.48:35483] helo=mail-vk0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 63/79-01781-12381485 for ; Fri, 02 Dec 2016 09:20:19 -0500 Received: by mail-vk0-f48.google.com with SMTP id w194so146433767vkw.2 for ; Fri, 02 Dec 2016 06:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=QfYXZP+wjdvZGBHIMPrXYdZWk7FG7QSalUEvyH80mdc=; b=RX3RxA187v4K0oaPiZ9BRNZZMiXaEtCt3T64WmtbKZThxT7q9osUx8cx54/wptW1tk yzh/U4qA0o81mCODg2b+pDgPjLwq6+zhwNIUDdZNXWhPpAvwZKmTA5iSel4EEOK9SPRS M8RxbnQmjjiH45CCizyYZf48Fe7zioQjetxVn5m9nXc48ZSAUv5BmDOazviHhzZObeRN 8msYrj2Nrp8fzD1EaIVW6AU7Xm9rPatGjSzx76PyUOwTZ31uEs2/r2rY7pdgRV8vgNUx y53vZ8F40ARWa3bU9ZGYRj3dAXE65UTqeuFdJYwFu+hLc2ExsZZ18bNyZjJI4G2VqSj2 c3dQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=QfYXZP+wjdvZGBHIMPrXYdZWk7FG7QSalUEvyH80mdc=; b=HqTreIVevjEiaVQVIsJT5jp8iITzf7gC7Vrg8IjLOo9sFI82MqFbmacGg85NBdZ5zK 10qHPrfvW5jyzall0yCvqOen+qLHB/cXmr1dE4h03j45HNhKjntOggefVzPl/baWJvzK 9G+ckreM7l2XPQwA/N/dbN8FjukuwGZUQUhG+o+zAwcShWEX3A9hu8D2W/FOmTE2MrVj dCVvLyRdUuCdHU+mxvzZ6RjmSHvi45bnGo5dF1DokfjiIp82AW+l/Ii85H+gL+pPqM6U LiB12CDja8RB3EbSWHfLEe38+mxT/P/DZtzhkytF3rie8qACjY890bMbPDdYLfU8Y1O5 unyg== X-Gm-Message-State: AKaTC003FTz2u1Vb9dsF6+j6r5FCAUIYXQe/UTHPjWJJmLdtujSm66hDOrazGJlXPeui4VE4Mklujtfk+y/DRg== X-Received: by 10.31.53.71 with SMTP id c68mr13861254vka.66.1480688414485; Fri, 02 Dec 2016 06:20:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.32.2 with HTTP; Fri, 2 Dec 2016 06:19:54 -0800 (PST) In-Reply-To: References: Date: Fri, 2 Dec 2016 12:19:54 -0200 Message-ID: To: Alex Bowers , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Re: [Concept] Magic Casting From: david.proweb@gmail.com (David Rodrigues) 2016-12-02 12:16 GMT-02:00 Alex Bowers : > var_dump was just an example to "show what type the variable is", and > completely untested. Consider replacing that line with anything that would > make it clear to you that it is now no longer an array, but a Collection for > example. Sure, but how the engine will knows when it should __cast()? For instance, when method(Type $variable) will call Type::__cast() for $variable, or just work with the Type instance? In this case, is not better I create an interface (like IsCollection) and call $variable->getCollection()? Thanks! -- David Rodrigues