#34317 [Fbk->Bgs]: static variable is set to 0 after reload
| From: | johannes@php.net | Date: | Wed, 31 Aug 2005 15:33:10 +0000 |
| Subject: | #34317 [Fbk->Bgs]: static variable is set to 0 after reload | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84255@lists.php.net to get a copy of this message | ||
ID: 34317
Updated by: johannes@php.net
Reported By: abstractd at gmail dot com
-Status: Feedback
+Status: Bogus
Bug Type: Class/Object related
Operating System: Windows
PHP Version: 5.1.0RC1
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The static property is part of the class not of the
object, if you need the static property's value you could
use __sleep and __wakeup methods to store it.
Previous Comments:
------------------------------------------------------------------------
[2005-08-31 16:39:41] sniper@php.net
Please don't put objects in $_SESSION as that doesn't really work and
never will. Can you provide a reproducing script without using
session?
------------------------------------------------------------------------
[2005-08-31 15:24:31] abstractd at gmail dot com
Description:
------------
When reloading the page, the values in the abstract baseclass is
reinitialized. They should (atleast I think so) stay the same!
Code: http://pastebin.com/350950
Is this a bug?
Expected result:
----------------
Before reloading the page:
B: 2
C: 2
After reloading the page:
B: 2
C: 2
Actual result:
--------------
Before reloading the page:
B: 2
C: 2
After reloading the page:
B: 0
C: 0
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34317&edit=1