|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2012-04-07 06:16 UTC] thomash dot usa at gmail dot com
 
-PHP Version: 5.4.0
+PHP Version: 5.3.8
  [2012-04-07 06:16 UTC] thomash dot usa at gmail dot com
  [2012-04-07 06:44 UTC] thomash dot usa at gmail dot com
  [2012-04-07 06:44 UTC] thomash dot usa at gmail dot com
 
-Status: Open
+Status: Closed
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ I'm not sure if this is a bug or if this is intended, but I didn't find anything in the documentation: If a class inherits a static property, but overrides it with its own static property, the property of the parent is used. (If the properties are not marked as static, I get the expected result) Test script: --------------- class A{ protected static $hi="Hello"; public function __construct(){ $class=get_class(); echo $class::$hi; } } class B extends A{ protected static $hi="What's up"; } $a=new A(); $b=new B(); Expected result: ---------------- HelloWhat's up Actual result: -------------- HelloHello