|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-10-03 16:54 UTC] laruence@php.net
-Assigned To:
+Assigned To: laruence
[2011-10-03 17:00 UTC] laruence@php.net
[2011-10-03 17:03 UTC] laruence@php.net
-Status: Assigned
+Status: Closed
[2011-10-03 17:03 UTC] laruence@php.net
[2012-04-18 09:48 UTC] laruence@php.net
[2012-07-24 23:39 UTC] rasmus@php.net
[2013-11-17 09:36 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 19:00:01 2025 UTC |
Description: ------------ The initial value of static locals inside trait methods is being lost. Test script: --------------- <?php trait T1 { public function inc() { static $x=1; echo $x++ . "\n"; } } class C { use T1; } $c1 = new C; $c1->inc(); $c1->inc(); Expected result: ---------------- 1 2 Actual result: -------------- 1