Advertisement
failfail

oop

Apr 2nd, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. class Parents {
  2. function Test(){
  3. echo "Parent class<br>";
  4. }
  5. }
  6.  
  7. class Child extends Parents {
  8. function TestChild(){
  9. echo 'function Child class';
  10. }
  11.  
  12. }
  13.  
  14. $obj = new Parents();
  15. $obj = new Child();
  16.  
  17. $obj->Test();
  18. $obj->TestChild();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement