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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sstar at cien dot ru
New email:
PHP Version: OS:

 

 [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

Pull Requests

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC