Skip to content

Instantly share code, notes, and snippets.

@nicolashohm
Created April 29, 2014 14:40
Show Gist options
  • Save nicolashohm/11402394 to your computer and use it in GitHub Desktop.
Save nicolashohm/11402394 to your computer and use it in GitHub Desktop.
<?php
class Base {
function __construct() {
$this->foo();
}
private function foo() {
echo 'foo';
}
}
class Sub extends Base {
private function foo() {
echo 'lel';
}
public function test() {
$this->foo();
}
}
$sub = new Sub; // foo
$sub->test(); // lel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment