From: mrpyle at libero dot it
Operating system: ANY
PHP version: 5.0.0
PHP Bug Type: Class/Object related
Bug description: self:: into child class seems to refer to parent class
Description:
------------
self:: into child class seems to refer to parent class, is this a bug?
Reproduce code:
---------------
<?php
abstract class ParentClass
{
static public function modifyStaticProp($propName, $propValue)
{
self::${$propName} = $propValue ;
}
}
class ChildClass extends ParentClass
{
static public $a ;
static public $b ;
}
ChildClass::modifyStaticProp('a', 'some value') ;
?>
Expected result:
----------------
ChildClass::$a == 'some value' ;
Actual result:
--------------
Fatal error: Access to undeclared static property: ParentClass::$a in
c:\phproot\static\bug.php5 on line 9
--
Edit bug report at http://bugs.php.net/?id=29647&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29647&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29647&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29647&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29647&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29647&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29647&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29647&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29647&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29647&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29647&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29647&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29647&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29647&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29647&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29647&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29647&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29647&r=float