summaryrefslogtreecommitdiff
path: root/Zend/tests/traits/static_003.phpt
blob: 01953cf7243d62ab80451952e6959a778fd1110c (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
25
26
27
--TEST--
Traits with late static bindings.
--CREDITS--
Simas Toleikis simast@gmail.com
--FILE--
<?php

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

	class A {
		use TestTrait;
		protected static $test = "Test A";
	}

	class B extends A {
		protected static $test = "Test B";
	}

	echo B::test();

?>
--EXPECT--
Test B