Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61441 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71004 invoked from network); 18 Jul 2012 21:27:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2012 21:27:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 209.85.212.182 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:50529] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BC/C4-46800-A3A27005 for ; Wed, 18 Jul 2012 17:27:23 -0400 Received: by wibhq12 with SMTP id hq12so1503119wib.11 for ; Wed, 18 Jul 2012 14:27:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:from:to:cc:references:subject:date:mime-version :content-type:content-transfer-encoding:x-priority:x-msmail-priority :x-mailer:x-mimeole:x-gm-message-state; bh=9alrkrzEo+Ks3L2RCuUwahxCno/HhaxQD2nDr6C3hOU=; b=AUgRFGpV9WRESno6jB/xDn3KfTG7x27s8Pg5zeIukgdiEN5BXb5cnOle2Fe+eemwZN kxjmHoCujbrOds2Mb7QLHEK/QPEPMKQpdDe842cP6cCbM8JtLqzpX3Ntc4o4YDGZ5B8/ sx9zfRX3wDnvO1lCNomSbFBrqZu/CP5hHIfCBtKThPIt+LXVltY6sBqDvNU4UI5sTqai hfaL2QhdMKy4Adm40kzJm2NKBx90jM+c/YZqulANtvjfHZKGmApLAGhKyiLGvxqBErsm t3n18RuamNAb8/GAryh74toCBhF7OhEzz60njINABZQx5JlCjIQ1jfKgQD4vqQ8kLUHP kSOw== Received: by 10.180.97.135 with SMTP id ea7mr9769248wib.11.1342646839223; Wed, 18 Jul 2012 14:27:19 -0700 (PDT) Received: from pc (95-42-82-194.btc-net.bg. [95.42.82.194]) by mx.google.com with ESMTPS id g42sm304871eem.14.2012.07.18.14.27.16 (version=SSLv3 cipher=OTHER); Wed, 18 Jul 2012 14:27:18 -0700 (PDT) Message-ID: <360FE50F76BF4A82A05DF13572C27D0F@pc> To: "Amaury Bouchard" , "Andrew Faulds" Cc: "Pierre Joye" , "Stas Malyshev" , "internals" References: <50059AF8.5050805@sugarcrm.com> <5005CB58.2020601@sugarcrm.com> <50066724.6050901@sugarcrm.com> <50067040.3090307@sugarcrm.com> Date: Thu, 19 Jul 2012 00:27:15 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Gm-Message-State: ALoCoQmyvc2b70SGc3PWPBd3VjPdHg2E4FuroAMYQVBkPxpj62SuF1ajB/VKk6SYU6ozyrFJ2lkB Subject: Re: [PHP-DEV] Pseudo-objects (methods on arrays, strings, etc.) From: sv_forums@fmethod.com ("Stan Vass") > But OOP-like syntax on non-object data is still weird. The question about > data manipulation behavior (is it a pointer like other objects or is it a > scalar like existing array?) is a tough one. For the user's point of view there is no difference between the passing semantics of numbers/string primitives and objects. Only arrays differ. However we already have ArrayAccess and so on for objects, which creates array-like objects with object passing semantics. So the idea that something that looks like array will have passing semantics like an array is already wrong in PHP. The clarity of passing semantics is not a valid argument against pseudo methods for string/int/float/array primitives. Stan