Skip to content

Instantly share code, notes, and snippets.

Created May 23, 2014 21:29
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 anonymous/bde457d69ac9893273d1 to your computer and use it in GitHub Desktop.
Save anonymous/bde457d69ac9893273d1 to your computer and use it in GitHub Desktop.
<?php
class Foo {
private $bar = 'foo';
public function getBar()
{
return $this->bar;
}
}
class Baz extends Foo {
private $bar = 'baz';
}
$baz = new Baz();
echo $baz->getBar(); // Prints 'foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment