-
-
Save anonymous/bde457d69ac9893273d1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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