Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
test.php
<?php
class Home {
protected function test() {
echo "Home::test() called\n";
}
final public function kitchen() {
echo "Home::kitchen() called\n";
}
}
class Room extends Home {
public function kitchen() {
echo "Room ::kitchen() called\n";
}
}
//Can this work?
$r = new Room();
$r->test();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment