xref: /PHP-5.5/Zend/tests/traits/language012.phpt (revision e6bd5368)
1--TEST--
2Statics should work in traits, too.
3--FILE--
4<?php
5error_reporting(E_ALL);
6
7trait Counter {
8   public function inc() {
9     static $c = 0;
10     $c = $c + 1;
11     echo "$c\n";
12   }
13}
14
15
16class C1 {
17   use Counter;
18}
19
20$o = new C1();
21$o->inc();
22$o->inc();
23
24?>
25--EXPECTF--
261
272
28