If I declare a base class as follows:
abstract class Parent {
protected static $message = \"UNTOUCHED\";
public static function yeah() {
st
Inheritance and static
properties does sometime lead to "strange" things in PHP.
You should have a look at Late Static Bindings in the PHP's manual : it explains what can happen when inheriting and using static
properties in PHP <= 5.2 ; and gives a solutions for PHP >= 5.3 where you can use the static::
keywords instead of self::
, so that static binding is done at execution (and not compile) time.
The answer is "with a workaround".
You have to create a static constructor and have it called to copy the property.