Pick the correct rule about which code can access a private property.
A subclass tries to access $this->secret, declared as private in the parent class, and gets an error.
Ready to try it?
Create a free account and subscribe to take "Visibility Modifiers: public, protected, private". Earn 70 XP and track your internship progress.
Already have an account? Sign in