Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82580 invoked by uid 1010); 15 Sep 2003 14:32:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 82534 invoked by uid 1007); 15 Sep 2003 14:32:30 -0000 Message-ID: <20030915143230.82533.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: jay@php.net Mail-Copies-To: jay@php.net Date: Mon, 15 Sep 2003 10:32:29 -0400 Lines: 46 User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Posted-By: 216.94.11.234 Subject: Problem accessing static objects via self:: From: jay@php.net (Jay Smith) Maybe I'm doing something wrong, but I have some code similar to this... printme()); } } $b = new bar; ?> Which gives me: NULL Fatal error: Call to a member function printme() on a non-object in /home/jay/static.php on line 22 Seems that the static property $blort in foo is getting lost somewhere. Meanwhile, accessing $blort in the parent class via parent::$blort gives a "Cannot access protected property" error. Am I doing something wrong here, expecting the wrong behaviour, or is this a bug? J