Mantis - Quercus
Viewing Issue Advanced Details
3165 minor always 12-12-08 13:41 12-14-08 12:58
koreth  
ferg  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003165: resin_restore_state doesn't reset static variables
<?php
if (! resin_restore_state()) {
  class Foo {
    public static $arr = array();
  }
  resin_save_state();
}
Foo::$arr[] = 'x';
print_r(Foo::$arr);

Load this page repeatedly and the array will have an additional element each time.

Notes
(0003612)
koreth   
12-12-08 13:43   
Static variables in functions appear to be fine; this is just static class fields.
(0003623)
ferg   
12-14-08 12:58   
php/404h