Skip to content

Instantly share code, notes, and snippets.

@jaytaph
Created March 12, 2014 11:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaytaph/9505214 to your computer and use it in GitHub Desktop.
Save jaytaph/9505214 to your computer and use it in GitHub Desktop.
<?php
class foo {
public function f1() {
print("F1: ".get_class($this). "\n");
}
public function f2() {
$this->f1();
}
public function f3() {
print("F3: ".get_class($this). "\n");
}
}
class bar extends foo {
public function f1() {
print("BF1: ".get_class($this). "\n");
$this->f3();
parent::f3();
parent::f1();
}
}
$b = new bar();
$b->f1();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment