From: 6eWmA67gxAebq at jeanpierredaviau dot com
Operating system: win xp
PHP version: 5.2CVS-2007-12-14 (snap)
PHP Bug Type: Output Control
Bug description: static array
Description:
------------
a static array dont retain a modification
PHP 5.2.2 (cli) (built: May 2 2007 19:18:26)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with DBG v2.15.5, (C) 2000,2007, by Dmitri Dmitrienko
Reproduce code:
---------------
http://groups.google.com/group/alt.comp.lang.php/msg/79060a6a7c4c806e
Expected result:
----------------
print_r (Registre::getRegistre());
Array
(
[0] => info2 Object
(
[var] => 0
[class] => info2
)
)
Actual result:
--------------
$a = new info();
$b = new info2();
$a = NULL;
print_r (Registre::getRegistre()); //dont print the changed
self::$leRegistre
Array
(
[0] => info Object
(
[var] => 0
[class] => info
)
[1] => info2 Object
(
[var] => 0
[class] => info2
)
)
--
Edit bug report at http://bugs.php.net/?id=43600&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=43600&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=43600&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=43600&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=43600&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=43600&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=43600&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=43600&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=43600&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=43600&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=43600&r=support
Expected behavior: http://bugs.php.net/fix.php?id=43600&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=43600&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=43600&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=43600&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=43600&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=43600&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=43600&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=43600&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=43600&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=43600&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=43600&r=mysqlcfg