Skip to content

Instantly share code, notes, and snippets.

@ilyasozkurt
Last active October 19, 2022 13:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ilyasozkurt/c91021c01e88365815afc320591c3822 to your computer and use it in GitHub Desktop.
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