<?php
class Base
{
public static $prop = 'BASE';
}
class Child extends Base
{
}
$excepted = 'REFLECTED';
$property = new ReflectionProperty('Base', 'prop');
$property->setValue($excepted);
$actual = Base::$prop;
echo "Should be $excepted and is $actual\n";
$actual = Child::$prop;
echo "Should be $excepted and is $actual\n";
Deprecated: Calling ReflectionProperty::setValue() with a single argument is deprecated in /in/PgFcm on line 16
Should be REFLECTED and is REFLECTED
Should be REFLECTED and is REFLECTED