From: chiky at fansajt dot sk
Operating system: Windows XP
PHP version: 5.0.4
PHP Bug Type: Scripting Engine problem
Bug description: changing static boolean in subclass
Description:
------------
I have created a class A with static boolean variable $bool and class B
which itherits from A. If I change value of $bool in class B, values
A::$bool and B::$bool differ. All other types (integers and strings) works
fine.
Is this a bug ?
Reproduce code:
---------------
class A
{
public static $bool = false;
}
class B extends A
{
}
B::$bool = true;
Expected result:
----------------
B::$bool = true
A::$bool = true
Actual result:
--------------
B::$bool = true
A::$bool = false
--
Edit bug report at http://bugs.php.net/?id=32982&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32982&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=32982&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=32982&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=32982&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=32982&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=32982&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=32982&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=32982&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=32982&r=support
Expected behavior: http://bugs.php.net/fix.php?id=32982&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=32982&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=32982&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=32982&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32982&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=32982&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=32982&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=32982&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=32982&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=32982&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=32982&r=mysqlcfg