Created
April 20, 2017 07:05
-
-
Save pavanBS/6a85d9a08a473fdb9bfd3c6f4b29f196 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 A | |
{ | |
public function printItem($string) | |
{ | |
echo ' Hi : ' . $string; | |
} | |
public function printPHP() | |
{ | |
echo 'I am from valuebound' . PHP_EOL; | |
} | |
} | |
class B extends A | |
{ | |
public function printItem($string) | |
{ | |
echo 'Hi: ' . $string . PHP_EOL; | |
} | |
public function printPHP() | |
{ | |
echo "I am from ABC"; | |
} | |
} | |
$a = new A(); | |
$b = new B(); | |
$a->printItem('Raju'); | |
$a->printPHP(); | |
$b->printItem('savan'); | |
$b->printPHP(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment