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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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 10:01:28 2024 UTC