Re: Reading static variables in child-classes failing?
| From: | marco@behnke.biz | Date: | Mon, 16 Dec 2013 12:40:37 +0000 |
| Subject: | Re: Reading static variables in child-classes failing? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322577@lists.php.net to get a copy of this message | ||
> class A {
> protected static $foo = "bar";
> }
>
> class B {
> public function readFoo() {
> return self::$foo;
> }
> }
You forgot to extend from A