php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #27897 static memebers overloading
Submitted: 2004-04-07 03:20 UTC Modified: 2006-04-03 12:49 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: sstar at cien dot ru Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 5.0.0RC1 OS: WinXP En Pro
Private report: No CVE-ID: None
 [2004-04-07 03:20 UTC] sstar at cien dot ru
Description:
------------
I found, that it isn't allowed to overload static members in child classes in PHP5. When trying to do it, the error "Static memeber can't be redeclared" appears.
Is it expectable behaviour?
If it is, it might be useful to add this feature.

Reproduce code:
---------------
class MyParent{
   static $test = 1;
   function __construct(){}
}
class MyChild extends MyParent{
   static $test = 2;
   function __construct(){}
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 20:01:32 2024 UTC