Access Control aka Visibility

Script 5.4 - visibility.php

Public

Initially...

In Test, "$public:'public'.

In LittleTest, $public:'public'.

Modifying $parent->public...

In Test, "$public:'modified'.

In LittleTest, $public:'public'.


Protected

Initially...

In Test, "$protected:'protected'.

In LittleTest, $protected:'protected'.

Attempting to modify $parent->protected...

In Test, "$protected:'protected'.

In LittleTest, $protected:'protected'.