Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ParentClass {
- protected function method1(): string {
- return $this->protectedMethod1();
- }
- protected function protectedMethod1(): string {
- return 'parent';
- }
- }
- class ChildClass extends ParentClass {
- protected function method1(): string {
- return parent::method1();
- }
- protected function protectedMethod1(): string {
- return 'child';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement