Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:3370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 76607 invoked by uid 1007); 11 Jul 2003 23:27:12 -0000 To: internals@lists.php.net Message-ID: <3F0F47D2.80208@chiaraquartet.net> Date: Fri, 11 Jul 2003 19:27:14 -0400 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 66.65.33.39 Subject: Questionable private $varname behavior From: greg@chiaraquartet.net (Greg Beaver) Hi, a discussion on php.general led to the discovery of this oddly legal script: Name; // prints nothing! } } // new class, for testing derived stuff class poodle extends dog { public function bark() { print "Yip!\n"; } } // I now create an instance of the // derived class $poppy = new poodle; // and set its private property $poppy->Name = "Poppy"; print $poppy->Name. "\n"; $poppy->printName(); print_r($poppy); ?> outputs: Poppy poodle Object ( [Name:private] => [DogTag:private] => [Name] => Poppy ) Is this expected behavior or should I open a bug? Greg