No, its 20, 20. Object context doesn't hinder PHP's scope visibility, so either instance can be modified in any scope. See this link for
visibility from other objects.
This makes sense though. When two types of objects are known to each other, they should logically know what each other know, regardless of if its public or lesser. A better way of writing it for clarity would be:
PHP Code:
public function changeValue($val, MyClass $obj = null)
Keyword 'self' can also be used as typehint. This is easier to see since we know that both 'this' and 'obj' are MyClass objects, so eachother should know what the other can do.