Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65048 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6705 invoked from network); 20 Jan 2013 23:30:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2013 23:30:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=cryptocompress@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cryptocompress@googlemail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 74.125.83.44 as permitted sender) X-PHP-List-Original-Sender: cryptocompress@googlemail.com X-Host-Fingerprint: 74.125.83.44 mail-ee0-f44.google.com Received: from [74.125.83.44] ([74.125.83.44:43333] helo=mail-ee0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E9/87-25745-C0E7CF05 for ; Sun, 20 Jan 2013 18:30:21 -0500 Received: by mail-ee0-f44.google.com with SMTP id l10so2561512eei.17 for ; Sun, 20 Jan 2013 15:30:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=1Y1zFNnt9sVLBsvgnLlwpXDJ32Q995VXPKvAd2cgvNI=; b=QA+IqrrbdE88ZbYrbANXI7P2VJnaKO5Lni1nTvekki29NghEQ+TnWUUJaxsbC3gTF7 8/ZW3JrnWbOsTixe3VRFfA6R5N/CJcAuqrkodRR7CfCStBhkyMUWZ7j+TkiA7w0X33qd Wz4LS6j0ZyKrt5SYeYQiBvjtD8hdrC7L1fWBjFEUrwqE3ICxO/MJlfvPU+KTQuIDgoaF PlCGOtAKUT76YQxd9Ah0ixI4XMX/2YIRhATjMiUc0v1dCojvMsZzN1OpeFHSwEiaz8FA BDqPo56hTNOx879CJPbxJOQrj9XF0SY54nMMtRoQTxutCurM+5GsC15uf1wuBWrkl/h1 NrIA== X-Received: by 10.14.223.200 with SMTP id v48mr53788429eep.24.1358724618409; Sun, 20 Jan 2013 15:30:18 -0800 (PST) Received: from [192.168.1.111] (mnch-5d86e694.pool.mediaWays.net. [93.134.230.148]) by mx.google.com with ESMTPS id f49sm19690138eep.12.2013.01.20.15.30.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 20 Jan 2013 15:30:17 -0800 (PST) Message-ID: <50FC7DB8.9040409@googlemail.com> Date: Mon, 21 Jan 2013 00:28:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: PHP Developers Mailing List References: <50F840F4.7080704@zerocue.com> In-Reply-To: <50F840F4.7080704@zerocue.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] Property Accessors for 5.5 From: cryptocompress@googlemail.com (Crypto Compress) Hello Clint, Nikita and Stas. > To facilitate complete functionality with properties it is necessary to > provide accessor functions to act on isset() and unset() calls. > Note: isset & unset implementations are always provided with default > implementations unless the author explicitly defines their own. a) With magic methods we can make the accessed property inaccessible (as properties may appear/disappear at runtime) and so we need some magic there (__isset/__unset as of 5.1). A property (accessors) is defined at design-time and may not become inaccessible so the default implementation for isset/unset should be sufficient. b) Result of (unset)$this->foo is always NULL. If we provide a way to alter this "set(NULL)" behavior: - it may fail before calling set(NULL) - unset($this->foo); $this->foo !== (unset)$this->foo; // foo is not foo? c) Logically isset/unset methods wrap up getter/setter at a higher level. Maybe both methods are better suited for "operator overloading/overriding RFC" where i would again expect some magic too. I wonder what the functionality would be as someone have to override isset/unset accessors. Do you have some examples? cryptocompress http://3v4l.org/NJWsW