Accessing a protected property of a post

The foolproof method here to grab a dynamic member variable is to use reflection!

Lets say we have this class:

class MyClass {
     private $myProperty = true;
}

We can use reflection to acquire the class, and the property:

$class = new ReflectionClass("MyClass");
$property = $class->getProperty("myProperty");

We can then set that property to accessible:

$property->setAccessible(true);

Now we can access the private member variable using the new $property object:

$obj = new MyClass();
echo $property->getValue($obj); // Works

Note, that the member variable is still private if we access it directly:

echo $obj->myProperty; // Error

However your code implies a static member variable, e.g.:

class Some_Plugin
    private static $_some_property;
}

Which this may not work for