Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7172 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41131 invoked by uid 1010); 18 Jan 2004 22:42:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41107 invoked from network); 18 Jan 2004 22:42:39 -0000 Received: from unknown (HELO matrix.gna.ch) (195.226.6.8) by pb1.pair.com with SMTP; 18 Jan 2004 22:42:39 -0000 Received: from localhost (localhost [127.0.0.1]) by matrix.gna.ch (Postfix) with ESMTP id 33C5A37D; Sun, 18 Jan 2004 23:42:39 +0100 (CET) Received: by matrix.gna.ch (Postfix, from userid 65534) id E3CB238F; Sun, 18 Jan 2004 23:42:37 +0100 (CET) Received: from cschneid.com (unknown [195.226.4.61]) by matrix.gna.ch (Postfix) with ESMTP id 6F56E37D; Sun, 18 Jan 2004 23:42:35 +0100 (CET) Message-ID: <400B0BDB.1090703@cschneid.com> Date: Sun, 18 Jan 2004 23:42:35 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031009 X-Accept-Language: de-ch, de, en-us, en MIME-Version: 1.0 To: Andrey Hristov Cc: internals@lists.php.net References: <4009585D.4050906@hristov.com> In-Reply-To: <4009585D.4050906@hristov.com> X-Enigmail-Version: 0.76.7.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on matrix.gna.ch X-Spam-Level: X-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.61 X-Virus-Scanned: by AMaViS Ultramail snapshot-20020531 Subject: Re: Casting of objects to array exports private/protected data From: cschneid@cschneid.com (Christian Schneider) Andrey Hristov wrote: > casting an object to array gives the possibility to get the values of > protected/private member variables : > > IMO, when casting to array with (array) only the public-ly visible > members should returned. Public/protected/private is there to protect you from bugs due to name clashes when you extend classes. It is not a sandbox to protect you from 'malicous' programmers. And I like it that way: PINJ(Y) - PHP is not Java (yet) Even though some people push it that way ;-) - Chris