ID:               29647
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mrpyle at libero dot it
-Status:           Open
+Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: ANY
 PHP Version:      5.0.0
 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

self is bound at compile time.


Previous Comments:
------------------------------------------------------------------------

[2004-08-13 12:17:33] mrpyle at libero dot it

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 this bug report at http://bugs.php.net/?id=29647&edit=1

Reply via email to