Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- abstract class ParentClass{
- abstract protected function calc($a, $b);
- }
- class ChildClass extends ParentClass{
- public function calc($c, $d){ //you can change parameters
- echo $c + $d;
- }
- }
- $obj = new ChildClass();
- $obj->calc(10,20);
- ?>
Add Comment
Please, Sign In to add comment