polymorphism in php is well explained here.
In one word: Polymorphism describes a pattern in object oriented programming in which classes have different functionality while sharing a common interface.
For your question: However the variable
$lee
is private, the function
function output()
is public and can be accessed outside.
And this page have more specific sinariao in the php programming language.