Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Hoge {
- public function foo() {
- $this->bar();
- }
- public function bar() {
- echo "Hoge::bar()\n";
- }
- }
- class Fuga extends Hoge {
- public function bar() {
- echo "Fuga::bar()\n";
- }
- }
- $fuga = new Fuga();
- $fuga->bar(); // Fuga::bar()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement