Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95082 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30836 invoked from network); 12 Aug 2016 10:16:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Aug 2016 10:16:33 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:38610] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/BC-56950-002ADA75 for ; Fri, 12 Aug 2016 06:16:33 -0400 Received: by mail-wm0-f45.google.com with SMTP id o80so23236113wme.1 for ; Fri, 12 Aug 2016 03:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=PboDwM3I0jmounwOohLHVgmVYDs/egYrRy1UQKZRFu4=; b=WGsLQDqRMgdJkpAaPfXcBphXICoV9jxi57vXS1vdxGfHgdn1my+41IU6yK9tJkTlxq S7nkUPjPhWdovLuiFsKXTRzITZx1vkbdVWk+1PD/+GKE/8mw0D1EB5gQ8UbMmv6IE/T8 K1ha3Bhx3G5HQ1UEtYZgZn6qEud5UEd9HyTFpkjpm/v/l1rdbbwRZeM7daFAfrAPvGFp PhVfhcWGGhiBztab+yM/b0isgIbjZ+tRdx6/SnRt46SWPRqaPUGOBKqFT7lHAhepXqEI Z4nJ0DeG7yhgVScwRkE5xQ/7buRD9ulGBJydALtbYsbyW/9n9TiguGEHdQa9KzF0ARQA j+CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=PboDwM3I0jmounwOohLHVgmVYDs/egYrRy1UQKZRFu4=; b=PlsNgbvKPbq5QZ5JL7/H89ZSDpAm28gupIyCThMd4EhaXY8XK+Vu9nFqtOmCkBk+2q IMyXS+oZWidIOsOGzy0VgDa7GMcpSOlXaD2aN0/f7FyjSULGX2j8XaSiva5X7pfctZSq qrrmqVrNijIXZHoGeRBqdZGv/AaDSVw5q4VmRcTgRmTnGSwfEGYuu4AR22VC9Pr+Krsz xDStpdFRmK+OJU4jK8jR+KX3gBR6XdTIZoBQWOjhxo9+lyiKoo7IpHcCD/OjVzjr1iQc NX6zwVdOols/fRPeGEexakhJ69xtXpdFttuwYMO1+aQZsrvcwM3Fu5mn9lxVR6JtGPl7 A6qQ== X-Gm-Message-State: AEkoouuLHnp4BssvKHaF03bhKdhQzx0cSREgXxgRNsMI5kH1e5DvJPWLK3V4fxS12N8Esg== X-Received: by 10.194.59.77 with SMTP id x13mr14712091wjq.144.1470996989049; Fri, 12 Aug 2016 03:16:29 -0700 (PDT) Received: from [192.168.0.98] ([93.188.182.58]) by smtp.gmail.com with ESMTPSA id i7sm6802934wjg.42.2016.08.12.03.16.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Aug 2016 03:16:28 -0700 (PDT) To: internals@lists.php.net References: <10fbcb03-5de8-4d9a-da1c-7e2bf77937cb@lsces.co.uk> <5657afc7-7569-5fc4-4a5a-27ed786c4fa5@gmail.com> <0825c173-5cb4-7f65-cf34-b45ca30919a3@lsces.co.uk> <8646c3ad-b929-cb0b-bad4-52a0a7160d16@gmail.com> <11ce571b-964b-5a3e-9f2f-3f69a8bc20b4@lsces.co.uk> <7d9db8d5-ae7a-4123-14f4-f76fb6d764c5@gmail.com> <24e9b0e6-f1f7-e6b7-0c6d-69e5ae1922cd@gmail.com> <2e10971f-03f6-f484-e6d0-1f5706b3d5d7@lsces.co.uk> Message-ID: Date: Fri, 12 Aug 2016 11:13:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <2e10971f-03f6-f484-e6d0-1f5706b3d5d7@lsces.co.uk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Simple variable handling. From: rowan.collins@gmail.com (Rowan Collins) On 12/08/2016 10:52, Lester Caine wrote: > I think the idea *I* am throwing out for discussion is a switch from > global_library($var, ... ) to $var->global_library( ... ) where $var is > now always an object without having every framework creating it's own > version of the wrapper? So kind of an extension to the "scalar objects" idea (e.g. https://github.com/nikic/scalar_objects) such that variables can have arbitrary properties / state rather than just the syntax sugar of ->methodCall() ? One problem I can see is that like with references and objects, the meaning of assignment has to change somehow: $foo = 'hello world'; $foo->setReadonly(); var_dump($foo->isReadonly()); // TRUE $bar = $foo; var_dump($bar->isReadonly()); // ? same value, different variable $foo = 'goodbye world'; var_dump($foo->isReadonly()); // ? same variable, different value Of course, the same applies whenever you pass the variable into a function, or return it from one... Regards, -- Rowan Collins [IMSoP]