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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
26 - 17 = ?
Subscribe to this entry?

 
 [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: Sun May 19 13:01:33 2024 UTC