diff options
Diffstat (limited to 'Zend/tests/bug55825.phpt')
| -rw-r--r-- | Zend/tests/bug55825.phpt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Zend/tests/bug55825.phpt b/Zend/tests/bug55825.phpt new file mode 100644 index 0000000000..23fc933ee6 --- /dev/null +++ b/Zend/tests/bug55825.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #55825 (Missing initial value of static locals in trait methods) +--FILE-- +<?php +trait T1 { + public function inc() { + static $x=1; + echo $x++ . "\n"; + } +} +class C { use T1; } +$c1 = new C; +$c1->inc(); +$c1->inc(); +--EXPECT-- +1 +2 |
