-
-
Save pavanBS/fce3784878b95d13cc0573f8d65d6664 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