Question regarding :: syntax

From: Date: Mon, 03 Jun 2002 16:06:53 +0000
Subject: Question regarding :: syntax
Groups: php.general 
Request: Send a blank email to php-general+get-100416@lists.php.net to get a copy of this message
According to the CHM manual: "Sometimes it is useful to refer to functions and variables in base classes or to refer to functions in classes that have not yet any instances.: Using parent::foo() works fine but I am having problems getting the variable part of this to work. For Example: class A { var $b A() { $b = "something"; } } class B extends A { B() { echo parent::$b // this is the problem } } Is there not a way to refer directly to the parent properties? Or do i have to setup a get function for every parent var that I want to access. Thanks -Jared

« previous php.general (#100416) next »