note 116141 deleted from language.constants.predefined by salathe
| From: | salathe@php.net | Date: | Mon, 17 Nov 2014 15:56:13 +0000 |
| Subject: | note 116141 deleted from language.constants.predefined by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-200934@lists.php.net to get a copy of this message | ||
Note Submitter: ishani_19892008 at yahoo dot com
----
<?php
/**
* @author Ahmet YUCEL
* @copyright 2014
*/
class A
{
function C()
{
echo "This is class " . get_class($this).'='.__FUNCTION__.'
'. __METHOD__."<br/>";
}
}
class B extends A
{
function D()
{
echo "This is class " . get_class($this).'='.__FUNCTION__.'
'. __METHOD__."<br/>";
}
}
$a = new A();
$a->C();
$b = new B();
$b->C();
$b->D();
?>
Result is:
This is class A=C A::C
This is class B=C A::C
This is class B=D B::D