summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/static_get_called_class.phpt
blob: bd7a60371240ac90ee3d30bcfc1c1a5dee0a4bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Traits and get_called_class().
--CREDITS--
Simas Toleikis simast@gmail.com
--FILE--
<?php

	trait TestTrait {
		public static function test() {
			return get_called_class();
		}
	}

	class A {
		use TestTrait;
	}

	class B extends A { }

	echo B::test();

?>
--EXPECT--
B