Have a look at the following code:
The code above works just fine, you can access private properties of different object – as long as you’re the same class. PHP manual confirms the behaviour:
Members declared as private may only be accessed by the class that defines the member.
Java has the same behaviour.