Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:50815 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42911 invoked from network); 2 Dec 2010 14:10:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2010 14:10:35 -0000 Authentication-Results: pb1.pair.com header.from=president@basnetworks.net; sender-id=unknown; domainkeys=good Authentication-Results: pb1.pair.com smtp.mail=president@basnetworks.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basnetworks.net from 208.97.132.81 cause and error) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: president@basnetworks.net X-Host-Fingerprint: 208.97.132.81 caiajhbdcaib.dreamhost.com Linux 2.6 Received: from [208.97.132.81] ([208.97.132.81:37400] helo=homiemail-a18.g.dreamhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/41-36645-AD8A7FC4 for ; Thu, 02 Dec 2010 09:10:35 -0500 Received: from homiemail-a18.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTP id 6D20C250069; Thu, 2 Dec 2010 06:10:32 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=basnetworks.net; h=message-id :in-reply-to:references:date:subject:from:to:cc:mime-version :content-type:content-transfer-encoding; q=dns; s= basnetworks.net; b=2t4wUaJ0or3l70Q+6WQEIguhlMuwZXKE9PlygVn0tJ7s5 Ruh2luL30d514B1UYmGQsy0Vj8Ps9LlILcOanOPyMV+V7fIq4qFbVuXdQV9J666D n1FfR2oFdpLcbwAcg9eGxHYcWNLiD5L8mGmsgZTLgFHQWqQVNcyKRuHt5I9tJw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=basnetworks.net; h= message-id:in-reply-to:references:date:subject:from:to:cc :mime-version:content-type:content-transfer-encoding; s= basnetworks.net; bh=BQbolGXs/4NTB6cY54ZQ7T1wcNc=; b=3Z/j4ygSu5Qj QXdJDk+UFId475c/LI9GZVVVsGqvW8ZOrIQgzH/eSHovbuEyMaNBW9D7ik3mQeOY v6CUu5Xb+wQ9Kl+a2IgfSA1TF31mc2xTid6pK3hDV6d6kBSlyabTSfujDNAkGZlP u/En/nDsdYdrAeGUV/mX8nmUdQNzh0M= Received: from webmail.basnetworks.net (caiajhbdcahe.dreamhost.com [208.97.132.74]) (Authenticated sender: president@basnetworks.net) by homiemail-a18.g.dreamhost.com (Postfix) with ESMTPA id 23F3725006B; Thu, 2 Dec 2010 06:10:32 -0800 (PST) Received: from 70.28.48.126 (proxying for 70.28.48.126) (SquirrelMail authenticated user president@basnetworks.net) by webmail.basnetworks.net with HTTP; Thu, 2 Dec 2010 09:10:34 -0500 Message-ID: <6aaa11079c20515d2efe4d59a7bd1e6d.squirrel@webmail.basnetworks.net> In-Reply-To: <4CF6542A.3070201@sugarcrm.com> References: <003601cb8fd0$f6494e80$e2dbeb80$@com> <4CF3B855.5010406@sugarcrm.com> <003401cb8fee$1be39840$53aac8c0$@com> <2450924ae03481f5b1382a7f00e5743d.squirrel@webmail.basnetworks.net> <4CF50245.5020807@sugarcrm.com> <4CF5118B.2030300@sugarcrm.com> <1faa4c3db62771335db714507ac2adfa.squirrel@webmail.basnetworks.net> <4CF613EB.40200@sugarcrm.com> <23d1e573d22236bad96d57ffff4e3001.squirrel@webmail.basnetworks.net> <4CF6542A.3070201@sugarcrm.com> Date: Thu, 2 Dec 2010 09:10:34 -0500 To: "Stas Malyshev" Cc: "internals@lists.php.net" User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP From: president@basnetworks.net Hello Stas, > In PHP, of course, class properties are dynamic, so you can add and > delete them at will. It is a standard feature of dynamic languages. For > a person coming from strict compiled language like C# it might be > unusual, but that's how dynamic languages work. No not unusual at all. You can dynamically add properties to class instances in C# as well. My point was that methods cannot dynamically be added or removed from class instances, even though variables can. I think what it comes down to, is it wont be possible to remove the actua= l property definition from the instance, but just be able to hide it, or make it appear like it is missing, to be consistent with the behaviour of standard variables. This makes for another issue though. If I unset() the property $foo, and then (because its gone), attempt to set $foo to something else, this is going to activate the property definitions set method, when I only expected a variable to be created. This is because the property definition still exists, but is just hiding (returning false from its isset handler). How should this situation be handled? - Dennis