Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class mA
- {
- const TEST = 'mA';
- public function getSelf()
- {
- return self::TEST;
- }
- public function getThis()
- {
- return $this::TEST;
- }
- }
- class mB extends mA
- {
- const TEST = 'mB';
- }
- $t = new mB();
- echo "getSelf : " . $t->getSelf()."\n";
- echo "getThis : " . $t->getThis()."\n";
Add Comment
Please, Sign In to add comment